Hacker News new | past | comments | ask | show | jobs | submit login

BTW, cheap-ass dark mode can be made by:

  filter: invert(95%) hue-rotate(190deg)
on <body> and perhaps fiddling with some backgrounds, to avoid transparency.



As someone who codes dark mode first thanks for the lazy “OMG, my eyes...” mode ;-)


I used to code with black themes for a long time but not anymore: Why not simply lower your screen brightness ?

I feel it better for my eyes because the text which i'm looking at is actually dark and not bright.

Most people with dark themes have high brightness levels on their screens. I think this can be bad on the long term. Especially that many screen elements are not as dark as their code, which makes them ultra bright


> Why not simply lower your screen brightness ?

On at least two cheap laptops I have used recently, the display driver steps down the overall display brightness when large regions of the screen are dark.

Windows 10 on an HP Stream 11, Intel integrated graphics and Intel display driver.

I can turn down the manual brightness to its minimal setting.

When large windows with white backgrounds are on screen, the backlight brightness increases. Decreases again when the windows are off screen or closed.

This does not change the manual brightness setting.

I have yet to find a tweak to disable this.


At least some Dell XPS 13 have this. IIRC it's feature of the LCD panel itself.


It can be turned off in the BIOS (a change I made about 15 minutes after getting my XPS13, which I otherwise love).


If I remember correctly, this can be toggled off in Power Options.


Do people also get annoyed at printed paper being white? Do they wish books had black pages? If not, as you say, it is only a matter of adjusting the screen for the proper brightness, depending on ambient light.

And it is true that, inevitably, whatever you're doing, sooner or later some white background or picture will appear on screen and blast your eyes with light. I cannot stand this, so I don't use dark themes on my PC.


A white screen with high brightness can't be compared to white paper. If you have a bright lamp behind the white paper, you can begin to compare the problem. A white screen is fine for young people without any eye problems, when you get older and start having problems with the eyes, you might need to cut down on blue light to prolong the usage of your eyes depending on what problems you get. I have to use filters to remove blue light to not make my eyes worse.


That’s why I love redshift, I shove everything way over into the red and turn the gamma right down, I also killed the overhead lights in my office so it’s a comfortable quiet cave to work in.


> Do people also get annoyed at printed paper being white?

Printed paper glowing white would indeed be very annoying.

Passive displays, such as old non-backlit LCD or e-ink, can be white and not annoying. Most people don't want to stare into a light source more than necessary.

Using proper brightness helps, and dark mode can help even more.


What's the difference between a screen emitting X light as a primary light source and a sheet of paper emitting the same exact amount of light, as a secondary light source ?

The amount of light coming to your retina stays the same..

Just lower the brightness until it matches the amount of light reflected by a sheet of paper placed next to the screen.

If you can't read the paper, turn the lights on. Being in a dark room dilates your pupils which makes them even more sensible to bright light...


When reading in bright sunlight, the white paper can be excessively bright, and yes, I've wished for a dark page.

I agree that it is about matching the brightness of the monitor with the background.


I mostly use light mode, usually I can't get it bright enough during the day!

I will say my personal "Dev" computer uses dark modes though, I find at night with multiple monitors it's just too bright.


I've also read that it takes more power (battery) to render black than it does white. Combined with the need for more brightness it doesn't seem like a good solution.

Calibrating my monitors took them from having piercing bluish whites to more softer pinkish whites and reduced daytime eye strain significantly.

I then use Redshift at night with the undocumented "preserve" switch to combine my icc profile with the Redshift changes.


> I've also read that it takes more power (battery) to render black than it does white

This really depends on the display technology and for more modern monitors, the opposite is true.


Very few monitors use OLED, and most phones don't either although it is becoming more common there.


I mean that when I build out an application / site, I build the Dark Mode first then convert the dark mode into the light mode. (Most of my users choose to use dark mode over light mode if the option is given to them)


I set my monitor’s colour thingy to ‘paper’ and the yellowish tint makes any light theme more comfortable than a dark one.


Have you used the Dark Reader addon? It's not amazing in firefox (has major performance issues on some sites) but I can't live without it.


Have you tried simply using Stylus with a custom style? I've been pretty happy with the setup. No performance issues.


Stylus is great when Darkreader breaks on certain sites. But when it works there are no substitutes e.g. navigating HN using the light setting in Darkreader offers a degree of customisation to create a scheme and reduce eye fatigue, without too much effort. Whereas, it can be hit and miss when trying various themes/stylesheets etc.


a lightweight alternative to dark reader is this one:

https://addons.mozilla.org/en-US/firefox/addon/night-light-m...

YMMV


I'm curious, why 190deg and not 180deg ?


Stylistic choice? Didn't find any information why exactly 190deg, so assuming the author just liked it that way.

Made a quick demo showing the difference: https://output.jsbin.com/hujebimavu/1

I don't really see any difference between 180 and 190 though.


Thanks for the demo. I barely see a difference too.



Subjective choice, you can fine tune based on website.



This has amusing effects on avatar images / pictures of faces. I wasn't quite mentally prepared for what I looked like with non-inverted colors but light shadows and dark highlights.

Edit: This is my dog: https://i.imgur.com/1ECupVA.png


while the invert operation is not truly invertible you can still partially fix this by applying another invert and hue-rotate on images.


Interestingly this works only if you have background color explicitly set. Otherwise you still get light background.


Yes, that's the "fiddling with backgrounds" part. :) This is mostly useful if you have prototype app and want a quick and dirty dark mode.


nice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: