Post

QQ about Dark Mode Toggles on websites How many options do you show to users? - Three values: System, Light, or Dark - Two values: Light, Dark (with one of them mapping to “System” behind the scenes). Why the one or the other? (I have an opinion about it, but I’m looking for external input)

8 reposts34 likes

Personally I think two values makes sense, with the initial value inheriting from the system theme. That way, it matches by default but the user can override. I suppose the only downside is if the user changes system themes regularly, and would like our site to update automatically as well?

I don't know if that's a thing; I haven't changed my system color theme in years. But maybe there are reasons that I'm just not thinking of? But really, the light/dark toggle should only save the value when it's changed. So the site will still update to match unless they override.

So, the argument I see for the system toggle is that we want users to be able to undo the light/dark option they picked so that our site can continue to update when they bounce between themes, and I just don't think that's a common enough problem to warrant adding an option.

Ah, I should've read the replies before commenting! I didn't think about things like the OS naturally changing based on time of day. I think context matters a lot; if it's something like a blog, I still don't think it really solves a big problem. But I can see the value for apps with power users.

Ollie Williams@ollie-williams.bsky.social

Three values. I like the auto behaviour on Mac: light mode in the day, dark mode at night. To respect that, “system” needs to be an option, not just light and dark.

I change system color scheme several times per day, depending on light conditions in my office (sunlight shining through window or not) or whether I'm working outside or inside.

My system theme changes with sunrise/sunset daily. I also enjoy working from a variety of locations, and will manually switch to system light mode in bright/sunny places and system dark mode in dimmer settings. That said, I always want everything to match system theme and prefer 0 manual overrides

The two values. I prefer to set the system and then adapt on whatever thing I am using, if necessary. My needs to switch are more likely to related to font choices anyway.

No you are not alone! Three options feels right but in practice it confuses the general user. Binary -> light dark vs Trinary -> light dark system. It's a little too much of a leap when your attention is focused elsewhere

To verify an assumption / get more data: I guess you have your OS set up to _not_ to automatically switch from light to dark depending on the time of day?

Follow-up: what do you write in storage when you chose an option? Take this scenario: - I visit in light OS and therefore see your site in light. - I use the control to change to dark. - I use the control to change back to light. What value is now written in storage: "system" or "light"?

Good discussion. For me, the explicit is always the winner. So, three options: system, light, dark. An example: pawelgrzybek.com For me the problem with 2 options is precisely the ambiguity you're asking about. The user intention may not necessarily align with your logic.

3 values but default should always be system It infuriates me how often the default is light/dark

I kinda like having only two, system being the default and switching to a preferred one after the first interaction. One click instead of two. The disadvantage is that you need to clear your state if you want to refer back to the system.

Steps: - get user preference through media query, store in state - listen to color scheme changes, update state - if user toggles, update state AND set localStorage - don't listen to color scheme changes if user has manually toggled - on reload, prefer localStorage over media query

The debate is whether the simpler UX is worth the fact that resetting the state is more difficult. I feel like as developers, we tend to care a lot, but I am not sure this is a big deal for most users.

Dark, Light, System for sure. I toggle my OS preference a bunch on both my phone and desktop, depending on whether I'm outside or inside. I want some websites to follow that switch, some others I always want in a specific dark or light mode (not all themes are created equally).

Always 3 values: System, Light, or Dark and always with system being the default I always want users to be able to switch back to default when the selected one of the 2 manual values

Thinking about this some more. System makes sense to reset the state. To me it feels strange that it’s part of the dropdown. If you’re offering more themes the user should be able to select a single theme. However when choosing “system” the user should be able to choose a day _and_ a night theme.

Three values, follow system is quite different intent wise from picking a specific theme. If my system automatically changes at night to dark mode I want that behaviour. But also I light want this specific site to always remain light mode.

as a developer, same. as a (tech savvy) user, i really just want browsers to easily let me override prefers-color-scheme on a per-website basis

One thing I see more than I'd like is two values and none of them are system it just defaults to a value and you can toggle it but never have it obey system. This is very silly.

To show the current state: Auto=active in system mode Light=active when in light mode (automatically / manually selected) Dark=active when in dark mode (automatically / manually selected)

three if you SSR, since you need an explicit 'system' state to avoid a flash before prefers-color-scheme resolves client-side. two is fine for pure client-rendered, just read matchMedia once. syncing multiple open tabs when the OS setting flips mid-session is the annoying part either way.

Always three values. Two values don't give me a clear way to reset my choice to auto (follow the system). Especially if one of them is mapped to the system. All my UIs are following the system scheme that changes depending on the time of the day. And I avoid using apps that don't respect my choice.

None if possible. Consistency with then system is more important to me. Also less options is less interactive surface areas is less opinions is less bugs is less ... Otherwise, two values where one is clearly labeled as system default

I had three - system, light, dark - along with 6 different 'colour themes' (using color-mix, etc) … then I removed it all for a simpler life :lolsob:

How do you deal with operating systems that automatically adjust their light/dark appearance based on the time of day?

If you're asking what happens when the OS changes from light to dark but the user specifically wants to keep a particular site on dark no matter what, the answer is I don't. I do a light/dark instead. But I do believe this is important and I'm working on something for this. standard.mode.place

standard.mode.placestandard.mode.place: carry your look from app to appAn open style standard on AT Protocol. Make a theme, save it to your account, and any app that speaks it renders it your way.

My stupid answer is that I like 3. I always want everything site/app to match system theme, but occasionally I’m curious about what the other theme looks like and manually switch it to check. Then I want to go back to system theme matching. 🙃

In general I would prefer a choice option on top of system defaults. E.g. iOS absolutely sucks if you don’t turn on reduced motion but that is not the same as I want reduced motion on a site I’m visiting. …so show a light/dark toggle that uses system if indeterminate (why it’s not a switch 😉)

But it depends on context - if it’s an app that would be expected to be used on a regular basis (unlike a site you would sometimes visit) I would probably have three options along with more customization options

It totally depends on the app! For complex apps with long sessions, 3 options (System/Light/Dark) give the best UX, even if they're hidden in a settings menu. But for short session sites like blogs or docs, a simple 2 option toggle right on the main UI is better for instant switching.

None. I rely upon a ‘prefers-color-scheme’ query, waiting for a browser-level toggle to be implemented sooner or later 😄 I could only hope cookie consent overlays will disappear to a similar fate eventually. One can dream…

(coming from Lea Verou's latest skeet) > waiting for a browser-level toggle to be implemented sooner or later Not sure if you mean per-website or globally, but Chromium browsers have a global toggle already! :D

I prefer two values (light, dark). The default depends on the design itself. For example, in my blog it's light-first, while in my course page it's dark-first.

Theme switching base on my system preference is confusing to me, I might need the dark interface for the system but browse the web in light mode, or vice versa.

Lea Verou, PhD@lea.verou.me

📊 For websites that use a tri-state dark mode toggle (system, light, dark), have you EVER clicked on the override that matches your current system theme? E.g. going from System to Light on a light OS (which produces no visible change). Experimentation aside obvs. Poll at github.com/LeaVerou/blo...

None. If all programs follow system and don’t have toggles, why should websites have toggles? For the three users who have a different mode per website? They can use a certain browser extension 😉

Three values. Always. The other one has the problem of masking the third state (system) which once manually set by the user is impossible to reset to.

That is a UX smell for me, you don’t know *why* users clicked on the light option while being on light mode. Maybe they do want to lock it there for the time being.

Fair, but as I commented in another thread I cannot guarantee that their choice will be respected as their cookies or local storage get cleared after a week of not visiting, and I have very few sporadic visitors! I also struggle to meaningfully dinstinguish between two identically visual states

But that could surprise users. Imagine this: - OS set to auto-switch light/dark depending on time of day - visit during the day, see light - Using the control, try out dark but don't like it and revert back to light - visit again at night Your site is now dark, although the user chose light.

Indeed, I wish I had more visitors that provided me feedback, but this works for me and I’m an auto-switcher. That being said if they do not visit my site for over a week their local storage is likely to be cleared anyways so I cannot guarantee their preference is actually saved for the long run.

Three on CodePen. We offer System, Light or Dark in the Editor Settings. It seems like the right choice to let users be explicit about which specific color scheme they want, especially for a code editor.

In terms of opinion. Well, more reasoning. I want to make it clear to the user that I respect their OS-level choice by default, but then allow them to override it if they prefer dark or light for _my_ particular website.

Because my opinion might not be the right one, so I’m looking for extra data.

Always system and use it as default... The other two for people who don't know how to set it in system or where it doesn't work. And don't call it 'auto' because the user thinks that you are going to manage it, and not the OS.

No values and follow the system, or three values. (Or an indeterminate amount once theming goes beyond light/dark only. Where's my prefers: hot-dog-stand)