Sort all the characters according to their brightness
You may want to separate the logic to determine if a character is printable into a method and rewrite the brightness calculation using streams:

Map&lt;Character, Float&gt; brightness = IntStream.range(0, max)
        .mapToObj(x -&gt; (char) x)
        .filter(Main::isPrintable)
        .collect(toMap(c -&gt; c, Main::getBrightness));


Your sort algorithm is very inefficient, and there isn't a need to write your own.  Streams API makes it nice and clean:

List&lt;Character&gt; order = brightness.entrySet().stream()
        .sorted(comparingByValue())
        .map(Map.Entry::getKey)
        .collect(toList());


Above snippets assume static imports

import static java.util.Map.Entry.comparingByValue;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toMap;