by CSSer · 6y ago · 0 comments
Granted, I use it too. Both my terminal and editor have dark themes. I’m not really sure why. The terminal isn’t really a big deal to me. I could go either way there. But I’ve just never found a lighter color theme that wasn’t offensive in an editor. I always try them for a bit and end up switching back.
The differentiating idea behind it is that for dark syntax themes, it makes sense to have the foreground of text be different colors. In contrast, for light syntax themes, it makes sense to have the background of text be different colors.
Atom: https://github.com/biletskyy/flatwhite-syntax Sublime Text 3: https://github.com/Willamin/flatwhite
https://github.com/Microsoft/vscode/issues/3429
I ran into this trying to do a Code theme a few months ago. (My favorite light theme -- and I am mostly a light theme person, as I have never believed dark mode was a particularly good idea except for terminal windows -- is the default theme from the all-but-defunct Mac editor Espresso, which used subtle background coloring in some places.)
"On a biological level, our eyes prefer the contrast between a light background and dark foreground."
On a biological level, our eyes prefer not to stare at a light source all day every day. Yet here we are.
For monitors, you should be adjusting the brightness frequently and in accordance with the ambient light level.
If you do that, you should perceive the background of your light mode content as neutral and so inoffensive that you don't even notice it.
For me, it’s because too much white background feels like staring directly at a light globe for several hours a day, and it hurts my eyes.
I spent ages hunting for a VSCode theme that wasn't just a blob of undifferentiated white. Turns out, now light themes are designed as dark themes first, flipped and just generally obey the rules of dark themes (eg. color pops out a ton in dark mode, it's a much more balanced part of the UI in a positive polarity environment and can be used more liberally).
We used to just design UIs, and most of what people started calling light themes were actually just "normal, not trying to be obsessively dark UI design". Normal UI design has really wide latitude to use a lot of stuff, dark theme is a much more narrow, specific philosophy in comparison. Take a look at eg. Office apps. The default "light" theme isn't super white, it's called "Colorful", is colorful, and it looks great. It just does what looks good without trying to be especially light or dark and surprise surprise, it works.
What did I end up with? Visual Studio Blue. All the different UI things are various very distinct shades of blue so the app has a characterful look and the UI elements are clearly differentiated, and the background has a slightly yellow hue to it. Does it look a little early 2000s-y? Yes. But it works.
That doesn't make sense. Why does light from white text scatter, but not light from white background?
The effect you're describing is correct, but the mechanism isn't. Aperture (pupil) size directly affects how focused the image is. The smaller the aperture, the sharper the image is. As an extreme example, if your aperture is a single point (a pinhole camera), the image can be focused without a lens.
https://en.wikipedia.org/wiki/Aperture#Maximum_and_minimum_a...
>I couldn’t find a scientific source on this, but a couple articles called it the “Halation effect”.
Articles describing this seems to say it's caused by the film medium, rather than being an optical effect.
Diffraction limits the sharpness, though. https://en.wikipedia.org/wiki/Diffraction-limited_system. Pesky wave nature of light in action.
> Articles describing this seems to say it's caused by the film medium, rather than being an optical effect.
Halation in film is caused by reflection from the back of the film. Most of them have an anti-halation layer to reduce this effect. I don't see any reason why one's eye wouldn't also be vulnerable to this effect (and probably has some biological mechanism to prevent light from being reflected out of the eye. Cats sure don't have this, though.)
Yeah, I noticed that. Searching the term directly gave me results related to film, but when I used other terms describing the effect they mentioned it in a different context. Makes me wonder if someone is just confused.
Specifically, bright light results in a small pupil which allows for better focus. And low light results in a large pupil which reduces focus.