14 ms·
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.
by megous 7y ago
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.
- Crosseye_Jack 7y agoAs someone who codes dark mode first thanks for the lazy “OMG, my eyes...” mode ;-)
- swozey 7y agoHave 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.
- butteroverflow 7y agoHave you tried simply using Stylus with a custom style? I've been pretty happy with the setup. No performance issues.
- johnnycab 7y agoStylus 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.
- modzu 7y agoa lightweight alternative to dark reader is this one: https://addons.mozilla.org/en-US/firefox/addon/night-light-mode/ https://addons.mozilla.org/en-US/firefox/addon/night-light-m... YMMV
- sdsdsdsds 7y agoI 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
- Crosseye_Jack 7y agoI 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)
- nominated1 7y agoI'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.
- viraptor 7y ago> 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.
- earenndil 7y agoVery few monitors use OLED, and most phones don't either although it is becoming more common there.
- noisem4ker 7y agoDo 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.
- Breadmaker 7y agoColor Bookmarklets https://www.squarefree.com/bookmarklets/color.html https://www.squarefree.com/bookmarklets/color.html
- escapecharacter 7y agoI'm curious, why 190deg and not 180deg ?
- diggan 7y agoStylistic 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 https://output.jsbin.com/hujebimavu/1 I don't really see any difference between 180 and 190 though.
- c0vfefe 7y agoThanks for the demo. I barely see a difference too.
- simonebrunozzi 7y agohttps://stackoverflow.com/questions/29037023/how-to-calculate-required-hue-rotate-to-generate-specific-colour https://stackoverflow.com/questions/29037023/how-to-calculat...
- megous 7y agoSubjective choice, you can fine tune based on website.
- deleted 7y ago[deleted]
- czechdeveloper 7y agoInterestingly this works only if you have background color explicitly set. Otherwise you still get light background.
- megous 7y agoYes, that's the "fiddling with backgrounds" part. :) This is mostly useful if you have prototype app and want a quick and dirty dark mode.
- droobles 7y agonice.
- chias 7y agoThis 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 https://i.imgur.com/1ECupVA.png
- the8472 7y agowhile the invert operation is not truly invertible you can still partially fix this by applying another invert and hue-rotate on images.