Live data from Hacker News

Six Levels of Dark Mode (2024)

cssence.com

31–40 of 56 posts

Re: Six Levels of Dark Mode (2024)

#32
post #16

Earlier quoted context omitted.

Use `background-color` in Firefox's `userContent.css`.

I love the idea of ending it for myself, but my users are still screwed?

how your users' browsers choose to render `about:blank` while waiting on your page to be delivered is outside of both your control and concern

on Gnome i've got system-wide dark mode turned on and idk, my Firefox is dark gray until it gets any content. so users have the power and should exercise it to tailor their experience as they wish

Re: Six Levels of Dark Mode (2024)

#33
kind of sad that the CSS specification wound up with this clunky `light-dark(white,black)` thing instead of literally anything more extensible like, `themed(dark(black), light(white), retro(purple))`.

Then you'd be able to have a cool theme dropdown like sites used to have, fully CSS-driven with essentially no JS required, in a compatible and modern way.

Re: Six Levels of Dark Mode (2024)

#34
post #6

I thought this was going to be about how people prefer different levels of blackness for the background in dark mode. I've heard people say that pure black is more battery efficient for OLED displays (but don't know if this is true), and I know some folks prefer a less-inky grey. I was wondering how there could be six levels though; I'd think 3 or 4 would be the most anyone could notice or care about.

I do wish there was more conversation around the levels of blackness for dark modes. Black screen and white text is physically painful for me. I usually have to resort to reader mode, or open up dev tools and change colors myself, to make a page like this readable for me.

I appreciate how hard it can be to make a good dark mode; I've spent months building a custom dark theme I term "mid-contrast". It's still WCAG compliant, but easy on my eyes, and I've stuck with the (maybe silly?) requirement of 16 colors only, like Solarized.

Re: Six Levels of Dark Mode (2024)

#35
post #6

I thought this was going to be about how people prefer different levels of blackness for the background in dark mode. I've heard people say that pure black is more battery efficient for OLED displays (but don't know if this is true), and I know some folks prefer a less-inky grey. I was wondering how there could be six levels though; I'd think 3 or 4 would be the most anyone could notice or care about.

It is significantly more efficient for oled displays, as off oleds don't use power. It also causes burn in on a smaller part of the display which is usually good (but this could end up being a disadvantage over time as the burn in contrast is higher).

It's also more efficient for led matrix backlights.

Edit: sorry, realized this is misleading: my testing was with light vs dark, not something like dark grey vs 00 black

Re: Six Levels of Dark Mode (2024)

#36
post #13
post #6

I thought this was going to be about how people prefer different levels of blackness for the background in dark mode. I've heard people say that pure black is more battery efficient for OLED displays (but don't know if this is true), and I know some folks prefer a less-inky grey. I was wondering how there could be six levels though; I'd think 3 or 4 would be the most anyone could notice or care about.

The more universal solution would be to standardize Reader Mode compatibility, and for browsers to let users configure how they want Reader Mode to look. In other words, instead of an n x m solution where every web site has to cater to each different user preference, there should be a simplified content view that every web site only has to support in a singular way, and that allows browsers to cater to the various us…

Shh, don't tell web designers about reader mode! They'll try to break it!

Re: Six Levels of Dark Mode (2024)

#37
post #13

Earlier quoted context omitted.

The more universal solution would be to standardize Reader Mode compatibility, and for browsers to let users configure how they want Reader Mode to look. In other words, instead of an n x m solution where every web site has to cater to each different user preference, there should be a simplified content view that every web site only has to support in a singular way, and that allows browsers to cater to the various us…

It's just n x 2 for light and dark themes.

The comment I was responding to was suggesting n x 6. And there are also aspects beyond brightness and contrast, like font styles and sizes, line height and margins, justification and hyperlink style, and so on. The things you can or want to configure in an e-book reader.

Re: Six Levels of Dark Mode (2024)

#38
post #8

Is there still no way to prevent the flash bang while waiting for initial content from the server?

A small blocking `` in the `` that reads the saved preference from localStorage and sets a class on `` before any rendering happens is the standard approach. You can also set `` which tells the browser to use the OS preference for the initial paint, covering the default case without any JS at all.

Re: Six Levels of Dark Mode (2024)

#39
post #34
post #6

I thought this was going to be about how people prefer different levels of blackness for the background in dark mode. I've heard people say that pure black is more battery efficient for OLED displays (but don't know if this is true), and I know some folks prefer a less-inky grey. I was wondering how there could be six levels though; I'd think 3 or 4 would be the most anyone could notice or care about.

I do wish there was more conversation around the levels of blackness for dark modes. Black screen and white text is physically painful for me. I usually have to resort to reader mode, or open up dev tools and change colors myself, to make a page like this readable for me. I appreciate how hard it can be to make a good dark mode; I've spent months building a custom dark theme I term "mid-contrast". It's still WCAG com…

Pure black background with pure white elements is a common accessibility issue.

And just curious, why would using "only" 16 colors be silly?

Re: Six Levels of Dark Mode (2024)

#40

kind of sad that the CSS specification wound up with this clunky `light-dark(white,black)` thing instead of literally anything more extensible like, `themed(dark(black), light(white), retro(purple))`. Then you'd be able to have a cool theme dropdown like sites used to have, fully CSS-driven with essentially no JS required, in a compatible and modern way.

Like the xkcd one?

https://xkcd.com

Not sure if it shows up for everyone, but there was a popover under the comic that did all kinds of crazy themes.

Post reply on HN