Dark color: Things to know about color when adopting dark mode
sarunw.com
sarunw.com
Maybe some day HN will see the light and implement native dark mode. :)
The last time I mentioned this I got some downvotes so what I will say is that perception is one of the areas where just because someone may be one of the few to experience a phenomenon doesn't mean that they are incorrect. It's subjective!
I like to read a lot during night time, and it was hard not to get burning eyes after a couple of hours.
But I learned about toning down screen brightness as to not get headaches, then I learned about Redshift which it's been a real life---or should I say eyes?---saver.
I even implemented a dark / light mode for my personal blog: https://lobotuerto.com/
Software brightness control on desktop monitors is something I've wanted for a while. Closest thing I've seen is a monitor with a built in light sensor that has the option of auto adjusting independent of the computer.
Taking my laptop as an example: Windows has two APIs for adjusting screen brightness, one of which only works for the internal display and one of which only works for external displays; and sadly the brightness keys on the laptop are uninterceptable and I have not come up with any way of linking the brightnesses either. I went hunting and settled on some old freeware called ScreenBright which I can invoke from the command line, so that now I just run `b 0` for night time and `b 40` for most of the day (and up to 70% in certain seasons—but 100% is pretty much always too bright where I use my external displays). Since I arranged that workflow, I have also written a tiny Rust program that interacts with the APIs directly which could replace it.
This doesn't seem to be true for most laptops. The ones I have used show a OS graphic when you turn the brightness down similar to the volume. Have tested this using linux on a dell xps and a macbook.
Unfortunately both still do not adjust the brightness of external monitors.
The trend for decades now has been to have buttons only, and often there's a menu you have to navigate through in order to actually get to the brightness settings. It's a real hassle on many monitors.
My main annoyance these days is that Office doesn’t let you invert the colors of a document as a display option. You have to actually change the background and text colors of the document.
I wish operating systems had a feature to invert the colors in a single window/app, as a fallback for when an application doesn’t have a dark mode.
That way you'll never be forced to see a website in bright white again.
[1] - https://userstyles.org/styles/163880/global-dark-style-every...
So I configure light mode (black text, white background) everywhere, then I use NegativeScreen for Windows to invert colors.
Bonus: you can also setup a transformation matrix to convert all brightness to red, giving you a red-on-black mode for use at night.
This is the only reliable way I know to get a perfect dark mode everywhere (in outlook, terminal, notepad...) as many apps don't support dark mode or have some half-assed support, but all of them have light mode now that the start menu also has light colors support
(One exception on android: samsung browser get special mention for its dark-mode that applies to all pictures)
If I'm watching night, I'd rather have a good night of sleep than a colour-correct video. I don't care much about colour accuracy.
If you care try the Samsung browser for android. They seem to care about such things.
https://i.pinimg.com/originals/97/1e/31/971e311093599ce52b99...
!makes blue readble on black background
XTerm.VT100.color4: CornflowerBlue
It made my ... friends life a lot betterMore broadly, my experience is just that I can accept higher contrasts in dark-on-light than the reverse. TextEdit light is 0 on 255, and I find it slightly harsh in some lighting. TextEdit dark is only 255 on 30, and even that's enough to be consistently annoying. Sublime's ~248 on ~40 is way more usable for me.
https://jsfiddle.net/c06fkq2a/
Use white for the key-light shadow, and a black for the ambient shadow.Now that I see what you mean, this is definitely better - the grey-on-black windowing of the original link is far less clear than backlighting each pane.
A while back, I remember people were writing subtle watermarks that took advantage of that effect. Straight-on everything looked normal. On a wide enough angle, the logo was pretty unmistakable.
They only do this because the iOS UI uses darkening to indicate depth, with no alternatives for dark mode - it has to be something other than pure black or there's nothing to darken. It's a band-aid.
Not sure how you would accomplish this in IOS, never done IOS development.
Experimenting quickly gets to you 'inconsistencies' with well-known principles that work in light mode, otherwise simply the 'full color scale' so to speak. It goes to show that light/dark mode cannot be a symmetry, it's a chiral* transformation of the color space.
[* chiral is my way of saying it's like left/right, the two spaces do not map directions the same, e.g. "from object color towards absence of color", what we call a shadow, should theoretically remain the same direction in any "mode"; e.g. a 'lighter shadow' feels unnatural, and feels more like a 'highlight'.]
My personal take is that dark mode lends itself very badly to using black as the 'normal' / background color; it produces too much contrast if you want colors to be decently saturated, and doesn't leave any room 'beyond' (darker than back is impossible) for things like shadows or a "depth effect".
Thus dark grey is the way to go usually; and most of the usual rules of 'light modes' apply (shadows to black, highlight 'lighter', invertable selections etc; the only meaningful remaining changes are thus related to fonts, whose 'Light' parameter l becomes its complementary k in the n-bit range (typically k = 2⁸-l). And you'd usually slightly darken or desaturate colors in general to reduce contrast for eye comfort.
You essentially retrieve a 'full color scale' space to work with, you're no longer bound to >50% light for anything that should be visible.
It's a really interesting topic, I find. Speaking as programmer with no design background nor particular talent. (just a demanding taste for aesthetics I guess)
Basically if you use pure black for the background, it will be #000000 if elevation = 0 and get slowly lighter from there for each dp of elevation.
https://github.com/m-khvoinitsky/dark-background-light-text-...
(not an affiliate, I just like it.)
Using such pre-created styles is a lot faster, easier, and more convenient than manually customizing each and every element by hand yourself.
Knowing how to do that is, of course, a good skill to have when you actually do want to do something custom for which a pre-rolled style does not exist or when existing styles do something you don't like.
I really wish Apple made it possible to give access to this feature without cutting off a significant portion of iOS users (including pretty much all schools, which are critical for us). Existing users can't upgrade, but new purchasers wouldn't be able to download at all.
But you've been able to change the "user interface style" for view controllers since iOS 12 [0]. And you've been able to add UIColors to asset catalogs that change depending on that setting since iOS 12 as well.
I'll be honest, I haven't tried this myself. But either this works or Apple's documentation is wrong.
[0]: https://developer.apple.com/documentation/uikit/uiuserinterf...
Building out a dark mode in your app has been readily possible for a long time now. You could've done it years ago.
But you like the idea of it being "global"? You mean, integrated with the rest of the OS, so that when the OS is in dark mode, your app is in dark mode? And you somehow want Apple to introduce that feature without introducing a new version of the OS? How does that work?
The flat design trend is so tired, it never looked good, and it promotes bad UX/UI. That has always been my opinion and it has grown only stronger as more bandaids like 'dark mode' are slapped onto it.
Dark mode is an accessibility issue. Yes, flat designs can exacerbate the issue – white space being a primary design pattern – but having a dark mode version of something would still be desirable, even if we went back to skeuomorphic design.
This might be sarcasm, but if not:
Some highlights of counterexamples include... The Office Ribbon Winamp Windows Media Player Kai's Power Tools QuickTime Player 4 Geocities websites Flash websites
... and many more http://hallofshame.gp.co.at/
Design is much like politics right now, it's hilariously sad when there is no concept of moderation or a middle ground.
Windows made it pretty easy to roll your own dark mode in the 9x days, and Kaleidoscope was around for Mac users.
With Kaleidoscope, you just double-clicked the scheme file in the Finder and _everything_ was themed, from window frames to buttons to fonts to icons, and there were practically no limits to what scheme designers could do. There were a lot of impractical schemes, sure, but they were creative, fun, and personal in a way computer UI hasn’t been in ages. Just take scroll through the tweets of this Kaleidoscope twitter bot for a taste: https://mobile.twitter.com/kaleidoscopemac
White-background designs are really just a hold-over from design approaches developed for paper. Whereas white is a default color for paper, it never was on CRTs, and isn't on OLED displays either. The design choice was mostly an implicit (or habitual) emulation of paper.
There are both hardware and ocular reasons why dark backgrounds are advantageous on screens, particularly mobile OLEDs. Power consumption, eye fatigue, contrast, durability, etc. We need to make some of these changes regardless of artistic design style.
Anyway, dark backgrounds and dark interfaces can and did exist without participating in the flat design trend.
Still, simple enough to solve that by cranking the PWM frequency to 2KHz or 20KHz.
What I want to see is higher refresh rates to avoid apparent blur from sample and old.
In particular, dark modes may become more difficult as you get older. I'm 67 and I have a great deal of trouble reading text in a dark mode.
There is a physiological reason for this, and if you do any photography using manual aperture control you may be familiar with it. Very high quality lenses should be sharp whether the iris is wide open or stopped down. But mediocre lenses have trouble wide open and give better sharpness stopped down to a more narrow aperture.
As you get older, the lenses in your eyes are not as good as they were when you were younger. There is a benefit in sharpness to have your irises stopped down instead of wide open.
Light modes accomplish this. The background light naturally triggers your irises to stop down, resulting in a sharper and more detailed view.
Dark modes encourage your irises to open wider, reducing your visual acuity.
Of course many people do enjoy dark modes, so there will never be a way to please everyone! But please consider not making dark mode your only mode.