[Return] [Catalog]

1 guest@cc 2020-06-05T18:47:03 [ImgOps] [iqdb]
File: luminosity-theme.png (PNG, 184.1KB, 560x485)
I just wanted to share something I've discovered and have been using for years.
I see programmers using various color themes in their editors, some themes are even designed specifically for programming like "solarized" that some programmers swear by.

But I think they've got it all wrong. The real "perfect theme" for programmers is anything that has _constant luminosity_.

Think about it, if you have syntax highlighting then your eyes are constantly going over colors of varying luminosity's and every time you go from one color to the other (which happens a lot) the iris in your eye has to adjust to let in more or less light than the previous color.
For the average programmer this could mean your iris needs adjusting multiple times per second as you read a single statement with several colors.

That sounds really hard on your eyes, so what if you make a color theme that has constant "luminosity"? Meaning that as your eyes dart around the code your iris is staying fixed letting in a constant, unchanging, amount of light the whole time. That way the muscles in your eyes can relax even as you're staring at a dark terminal screen all day long.

Pic related is a constant luminosity theme (I just opened up GIMP which has a color picker with a luminosity slider, and chose 8 colors with the same luminosity values).
After switching to this theme I've hardly ever had any eye strain even after spending an entire day programming.
Of course it has some downsides, like you can't read the text over a colored background, but that's usually not a problem when it comes to syntax highlighting.

Just sharing my discovery in case it helps someone else who gets eye strain as often as I did.
»
2 guest@cc 2020-06-06T06:02:15
My syntax highlighting scheme is black for the background, and gray for the text.
»
3 guest@cc 2020-06-06T08:41:51
It certainly feels nicer to look at than others so I think you're on to something. Thanks for the tip.

>>2
Black text on a grey background doesn't get enough love. I think it works very well.
»
4 guest@cc 2020-06-06T08:50:16
Do you know if there's any research on this? How much variance is too much? I wonder if it can be done with proper contrast.
»
5 guest@cc 2020-06-06T15:11:12
> (I just opened up GIMP which has a color picker with a luminosity slider, and chose 8 colors with the same luminosity values).
I'm not sure you can get good results like this; iirc the human eye doesn't perceive luminosity the same for every colour, a bit like how it sees more shades of green than any other colour. I remember coming across some research on this but I can't find it right now.
»
6 guest@cc 2020-06-06T21:46:38 [ImgOps] [iqdb]
File: luminosity2.png (PNG, 6.92KB, 300x87)
>>5
>iirc the human eye doesn't perceive luminosity the same for every colour

I think you're thinking of brightness. That's the normal HSV color picker scheme (hue, saturation, value). But there is another one that's LCh (luminosity, chromaticity, ??).
Luminosity values are based on experimental data for the human eyes response to colors. It's sort of like "perceived brightness".

Pic related. On the left side is a comparison of green and blue text at the same brightness (25), but their luminosities differ greatly (green=22.5, blue=2.8).
The right side is the same except that the luminosity of the blue text is increased to match the green's luminosity at 22.5.
See how reading the left side feels like your eyes have to adjust differently for each color, but on the right side it's the same?
»
7 guest@cc 2020-06-06T22:31:48
This is insightful. Is there an ideal luminosity? Is one better than another?
»
8 guest@cc 2020-06-07T01:21:17
>>7 Not sure, but for the record the theme in the OP pic uses 70 (out of 100).
Although, I have heard the Solarized theme is based on a decent amount of research. Like they have a brighter background and it's slightly green which might be good.
Maybe copying the Solarized theme and just adjusting the colors a bit to have a fixed luminosity would be pretty good.
»
9 guest@cc 2020-06-07T07:45:52
>>6
ah yeah you're right, I mixed up the terms. always thought brightness and luminosity were synonyms.
»
10 guest@cc 2020-06-11T20:21:33 [ImgOps] [iqdb]
File: luminance-solarized.png (PNG, 182.06KB, 608x483)
Just posting a version based on Solarized. I think I like this a lot more than the one in the OP.
Also I reduced the vibrance of that red color that Solarized uses because it just didn't feel right.
»
12 guest@cc 2020-07-08T18:53:13 [ImgOps] [iqdb]
File: visible-wavelength-spectrum.jp… (JPEG, 62.46KB, 550x300)
>>1
>>6
anon... you have it wrong. the two phrases in your second left picture have the same amount of luminance, or the perceived amount of light if same amounts of light of different colors were emitted. whereas the words in your right picture have the same brightness, or the amount of perceived emitted light if the amount of emitted light was adjusted such that both colors would look equally bright to a human.
the issue isn't with the iris. the actual reason why it is harder to make out the words in your left picture is because your brain has a harder time detecting dark colors compared to the right picture, which was adjusted to look equally bright
»
13 guest@cc 2020-07-24T03:14:41
i'm not sure if you're implying that a color theme with constant luminosity is better for reading code easily, though i do uncritically accept that constant luminosity is probably good for reducing eye strain. but i don't think eye strain is the only factor in a good syntax highlighting scheme. the contrast between keywords and language tokens is also important, so the perfect color scheme would need some amount of contrast between colors too. also, color schemes are really personal not just in preference i think. what's tiring and confusing for me might be very comfortable and legible for you. i think if the number of unique colors are kept to a minimum it's a good color scheme. a lot of them have too many colors. if your editor supports italics and bold, that's another channel that can convey syntax information. i also like to use different values of the same color to keep the number of uniquely contrasting colors low. i arrived at this after months of trial and error.

[Return] [Catalog]
Delete Post:
OptionsPassword
Name
Comment
File