journal ·
Dark mode follows your device until you choose
Every page on this site opens in the look your device asks for, light or dark, and a small button in the header lets you choose the other one.
The first visit
Choosing the look needs nothing from you. Your browser already knows whether your phone or computer is set to a light or a dark appearance, and it tells the page when asked. The site simply follows that. If your device switches to dark at sunset, the site switches with it, as long as you have not chosen anything yourself.
The button
In the header, next to the language menu, there is a small button with a moon or a sun on it. Pressing it flips the page to the other look at once. The button is a real button with a label, so it can be reached with the keyboard and read out by a screen reader, and its state is announced as pressed when the dark look is on. It sits beside the language menu on a phone as well.
What is remembered
When you press the button, the page saves your choice in your browser under a single name, ipe_theme, with one of two values: light or dark. That is all. It is stored on your device, in the same kind of storage that remembers your language, and it is never sent to us. There is no account, and the choice is not a cookie: it is not sent with any request, and no counter records how many people prefer the dark. Clear your browser data and the choice is gone, and the site goes back to following your device.
No flash
A common annoyance with dark modes is the flash: the page loads white for a moment and then turns dark. To avoid it, a very short script runs at the top of every page, before anything is drawn. It reads your saved choice, or your device setting if there is no saved choice, and sets the look first. Then the page is painted once, in the right colours. If scripts are turned off, the page still follows your device setting through plain styles; the button just does nothing without scripts.
Colours that stay readable
The dark look is not the light look turned upside down. The page keeps the same blueprint feeling, with thin cobalt lines on a deep blue-grey sheet, and the text is a soft off-white rather than pure white, which is easier on tired eyes. Links, buttons and focus outlines keep enough contrast against the dark background, and the reading column is the same width in both looks, so nothing moves when you switch.
ipe(); // be still
A website should respect the room you are in. If it is late and the lights are low, the page can be quiet too. If you would rather have it bright, one press is enough, and we will not ask again.