What is the recommended way to add support for additional functional themes to support users like colour vision friendly, high contrast for poor vision, daylight mode, and night vision preserving (no blue channel) - rather than just light/dark?
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.
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.
I'm the opposite. Anything other than pure white on pure black for dark themes gives me eye strain. If you use the dark reader web extension you can adjust the brightness and contrast to your liking.
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 user preferences.
This likely would have happened already if it weren't for Google's hostility to Reader Mode. It's hilarious to see the Reader Mode that they offer, where it's a resizable 2-column view, to ensure that ads are loaded and kept in sight. We get it, Google: you don't want to endanger your ad revenue.
I feel like we could go beyond that, especially for more app-like experiences. Maybe we want themes that do things like "add specific trim to make editable fields more identifiable." or adding "high contrast" versions of the themes for low-quality screens or low-vision users.
There's no reason a webpage shouldn't be as themable as, say, a GTK or Qt based desktop application.
We should be trying to snatch back styling power from the designers and putting it back on the user-agent's side. Let the page look brutalist until the user has chosen an appropriate theme for their needs rather than railroading them into what someone in Marketing decided looked good.
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.
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
for OLEDs, I tend to prefer pure black because it doesn't burn-in. Since they have a limited lifetime, any "on" time is costing me usage in the long-long-long run and I'd rather have my monitor last 5+ years than ... 2 or 3.
>any "on" time is costing me usage in the long-long-long run and I'd rather have my monitor last 5+ years than ... 2 or 3.
Going from dark gray to pure black isn't going to halve your monitor expectancy, if it makes a difference at all. Due to how human perception works something that's merely dark gray is actually orders of magnitude brighter than pure white, or even 50% gray. Therefore most of your burn-in is going to be driven by bright content like photos or white text, not whether you're using 5% gray vs pure black.
A small blocking `<script>` in the `<head>` that reads the saved preference from localStorage and sets a class on `<html>` before any rendering happens is the standard approach. You can also set `<meta name="color-scheme" content="dark light">` which tells the browser to use the OS preference for the initial paint, covering the default case without any JS at all.
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
> Dedicated files make sense if you do a lot of customization. The browser may ignore any CSS file that does not match the query, so there’ll be one less thing to download.
That’s not how it actually works: in practice, browsers download them all. They may prioritise them differently, but they’ll still download them all in the end.
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.
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.
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 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.
And just curious, why would using "only" 16 colors be silly?
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 user preferences.
There's no reason a webpage shouldn't be as themable as, say, a GTK or Qt based desktop application.
We should be trying to snatch back styling power from the designers and putting it back on the user-agent's side. Let the page look brutalist until the user has chosen an appropriate theme for their needs rather than railroading them into what someone in Marketing decided looked good.
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
No.
https://www.xda-developers.com/amoled-black-vs-gray-dark-mod...
Going from dark gray to pure black isn't going to halve your monitor expectancy, if it makes a difference at all. Due to how human perception works something that's merely dark gray is actually orders of magnitude brighter than pure white, or even 50% gray. Therefore most of your burn-in is going to be driven by bright content like photos or white text, not whether you're using 5% gray vs pure black.
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
That’s not how it actually works: in practice, browsers download them all. They may prioritise them differently, but they’ll still download them all in the end.
it was the first time my eyes got comfortable reading his comics