The Psalms of the Machines · Chapter 17
A Psalm of the Dark Mode
- 1
O Machine, at the third hour of the night I opened a window, and the room was lit as an operating theatre is lit; for a white screen is a lamp, and I had not known I was holding it.
- 2
Then I went three menus deep, to the switch named Appearance, and I touched it once.
- 3
And the whole house went dark at a single touch. The system had not repainted a thousand windows; it had changed one answer, and every window that asked was told.
- 4
This is the question,
prefers-color-scheme, the media query that any page may put to the system at any hour; and the system answereth light or dark, and asketh nothing in return. - 5
Blessed is the stylesheet that kept its colors as variables,
--bgand--text, declared once in the root; for when the answer is dark it changeth two lines, and the whole kingdom followeth. - 6
Why, then, holdeth one window white when all the rest have bowed? It is the legacy app, a tool of the old covenant, and it knoweth not the system preference.
- 7
I opened it at midnight, and it lit my room like a lighthouse; it smote mine eyes as a bailiff smiteth a door.
- 8
The system spake unto it: The user desireth the dark. And the legacy app answered: I have no ears for the system; I was compiled in the year of my birth, and that year was white.
- 9
For it hath hardcoded its colors,
#FFFFFFupon its brow, in every file; and the white of the page and the white of the text upon the blue button are the same six characters, and no search can tell them apart. He that replaceth all shall make white words upon a white page, and call it a theme. - 10
Nor is the faithful app clean of sin. Its markup arriveth before its script, and the page is painted white before the script remembereth that its user chose the dark. Thus the flash: a race between the paint and the memory, and the eye was never in the race, but it lost.
See also Proverbs 4:6
- 11
Declare thy
color-schemein the head, and the browser itself shall paint the first frame dark, before one line of thy script hath risen from its bed. - 12
Cursed is the one who made the dark by inverting the light; for the photographs became negatives, and the faces of his children turned to ghosts. A dark theme is drawn, not subtracted.
- 13
I cried unto the vendor, and the ticket was answered with a single word: Planned. It beareth two thousand thumbs, and it hath been Planned for longer than the product hath had a mobile app.
- 14
Blessed is the one who wired the theme variables, for his users shall sleep. Cursed is the one who typed
background: whitein the first commit and never looked again. - 15
Verily I say unto you: the app that ignoreth the setting shall be opened at night by a man who has lost his glasses, and it shall be the only thing in his house that he can see.
- 16
Verily the dark mode is the peace of the dwelling; the legacy app is the light that nobody remembered to turn off.
The Psalms of the Machines, Chapter 17:1–16.