Serendipity Styx blog post | All posts

Light or dark mode what is the difference

N° 2021/9

Light or dark mode, what is the difference and what is your preference?

The more you look on devices, the more you are affected by shining or flashing lightning, hurting your eyes, reducing the battery wastage, having burn affects, show too many blue pixel lights not good for your eyesight, etc.

This is why developers like dark modes.
It helps reducing the noise of light your eyes has to blend out.

So we have a populating ambition to create dark modes on apps, by webpages and by browsers, all over.

Therefore we need to clear some things out, since we have too many players:

  1. At first it started with very single webpages and apps giving a dark mode or dark theme to enable or to live with.
    The first case is good, since you decide which you prefer. And in some cases, like developed for the pure theme with upcoming Serendipity Styx 3.7, you can easily switch it by a button where it makes sense to you. It even has a condition if your browser prefers-color-scheme: dark, so it knows where to go when you first arrive without a selected set.
  2. Then it dropped over to systems, like android for example, which allowed to set a dark or light mode preference. The more that came into play, the more the system and other developers thought of generally turning everything dark.
    But this is shaky, since a machine or program - even with good algorithms - cannot really decide what looks good or not, or suits you best. Down to the bottom they just turn light into the opposite dark color and vice versa. That only works good as simple as that on pages which are designed as simple as that!

    So we have apps and the system.
  3. At last the Browsers started to take over and made the confusion complete.
    Browsers have themes. These can be light or dark and influence the whole frame behaviour of your magic monocle.
    Then they have modes, which allow to overwrite certain colors of webpages, eg. for link colors.
    And they can depend on light themes forcing dark pages, light themes not doings such stuff, dark themes with dark forced pages and dark themes with untouched webpage colors.

But wait! Didn't you say there are system dark modes too? Right! Browsers have to take this conditions into too.

With Firefox 95, which just arrived in the public, you will see this affect. Sudden pages return dark without being explicitly set to, depending on settings you might have taken in your system, browser or application before.
Firefox for example has a "ui.systemUsesDarkTheme" configurable config variable, which is set by your theme choice. The new, beside theme setting and color overwrites, is:

? about:config
? see “layout.css.prefers-color-scheme.content-override
    0 = dark (users may want a light system style, but dark websites)
    1 = light (users may want a dark system style, but light websites)
    2 = system
    3 = browser theme (default original setting = 3)

This check and set can help to restore behaviour you have been used to.

Really! Didn't I say this before? I like dark modes! 😀

What next?