Dark Mode by Local Sunlight (2021)
Posted2 months agoActive2 months ago
ctnicholas.devTechstory
calmpositive
Debate
40/100
Dark ModeUser ExperienceCSS
Key topics
Dark Mode
User Experience
CSS
The article discusses implementing dark mode based on local sunlight using CSS media queries and geolocation, sparking a discussion on the practicality and user preferences for such a feature.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
10m
Peak period
25
120-132h
Avg / period
14.3
Comment distribution43 data points
Loading chart...
Based on 43 loaded comments
Key moments
- 01Story posted
Nov 3, 2025 at 10:15 AM EST
2 months ago
Step 01 - 02First comment
Nov 3, 2025 at 10:25 AM EST
10m after posting
Step 02 - 03Peak activity
25 comments in 120-132h
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 8, 2025 at 7:51 PM EST
2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45799949Type: storyLast synced: 11/20/2025, 6:48:47 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Or maybe there is some other sensor you could use? Like if photoelectric effect triggered some noise in your microphone or slightly more TCP retransmissions some such
https://en.wikipedia.org/wiki/Ambient_light_sensor
Happily KDE has it built in and does both location detection, enter co-ords or click map for setting it how you want.
I'm 60°N, as with my alarm clock, I've set a static profile to follow 365 days a year since the sun is unreliable.
The average monitor has a brightness level equivalent to screaming in a study room, and a color calibration that assumes fluorescent office lighting.
At a certain point, white text on black just isn’t readable but the inverse is somehow.
Solid work though, especially the twilight transitions. Loving it!!!
>Automatically setting the theme is a nice touch for most, but accessibility comes first, and if the user has a preference, it's always right to respect their choice.
>You can check for users' colour scheme preferences in CSS & JavaScript with the following snippets:
Let the user decide the schedule, please.
Another point is that some types of content just don't work with dark mode. Maps for example. I have used multiple apps that use maps or present data on a map. None of the maps look good when dark. As such I always turn off dark mode if an app displays maps as part of its main user journey.
Can you say more about your use case and why you prefer gray over black?
There's a CSS preference for contrast. It seems easy enough to handle `@media(prefers-contrast: low)` and set a gray background. The contentious part would presumably be the default; I would have thought #000000 was the obvious default for a dark mode but apparently that's not what everyone prefers. Ideally, OSes and browsers would expose controls for this in a straightforward way, the way they handle dark mode. https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/A...
Does your preference change if you reduce your screen brightness?
Bright features over a really dark background can be unsettling, but that's about screen adjustment, not really about the software colors.
Anyway, I do argue that people shouldn't just pick #000 and #fff by default. But that's because if you are already using the extremes of your palette, you can't get a more extreme one when you need to emphasize something. The arguments on "unnatural" colors and visual preferences all seem baseless to me, because those numbers don't correspond with any actual physical color, they are all relative.
About dark maps, I've seen it done well. Exactly once, and I can't point you the software because it was embedded and I don't remember what the device was. But as hard as it seems to be, it is still possible.
I don't like all toggles to be gone since dark mode quality varies a lot, and also I may want some sites or apps one way and some another way. So removing the choice and slapping all configuration under a single "dark/light" browser toggle really annoys me, especially when sites stop providing the toggles because it's more convenient to just use the CSS property and do less. To me it's another step in the dumbing down of the UIs that I regret.
Perfectly ok with defaulting to that global setting though.
Similar vibes to the relative date infection with no option to opt out and get the full date in most sites nowadays.
Really helps with circadian rhythm, I've found. Especially because I take a live webcam feed and convolve a hexagonal mask to match my light panel's layout, so it's like having a low res window from whatever webcam I would like. And, at sunset to night, it smoothly fades the light panels into a display that represents a angle compressed sky projection of the stars relative to a fixed location moon with live phase displayed.
Obligatory images:
The day themes: https://youtu.be/danulUB-J-k
Light panels: https://imgbox.com/MQfPNjtI <- sunset on the hex display
https://imgbox.com/qcrFxncU <- random cloudy day hex display
https://imgbox.com/EOFk63WZ <- a night still of the hex display
I don't care if it's sunny outside. Rainy days in Germany can get quite dark long before Night Shift kicks in.