News for hackers. Stuff that matters.
Re:Ask HN: Dark mode for HN please? by xingyzt on Friday May 15, 2020 @09:45PM (#23199714)

  @media (prefers-color-scheme:dark){body{filter:invert(1) hue-rotate(180deg)}}
One-liner inverts the brightness and preserves the orange.
Re:Ask HN: Dark mode for HN please? by dastx on Saturday May 16, 2020 @04:43AM (#23201630)
This surprisingly works well. One thing, the background of body is still white for me on desktop this is what I have (combine with someone else who commented about the brightness):

    @media (prefers-color-scheme: dark) {
      body {
          background: #222222;
          filter:invert(1) hue-rotate(180deg) brightness(0.9)
      }
    }
Edit, also works on hn.algolia.com
Re:Ask HN: Dark mode for HN please? by Liskni_si on Saturday May 16, 2020 @06:35AM (#23202294)
> the background of body is still white for me

Had the same problem, changed "body" to "html", added background: #fff, now it works.

I turned it into a bookmarklet to make it easy to use on any website:

javascript:styles='html {filter: invert(1) hue-rotate(180deg) brightness(.9); background-color: #fff; }'; newSS = document.createElement('style'); newSS.type = 'text/css'; newSS.innerHTML = styles; document.documentElement.getElementsByTagName('head')[0].appendChild(newSS);void(0);

Re:Ask HN: Dark mode for HN please? by dastx on Saturday May 16, 2020 @09:11AM (#23203096)
Use stylus to automatically inject it.
Re:Ask HN: Dark mode for HN please? by saagarjha on Friday May 15, 2020 @11:17PM (#23200191)
Unfortunately the colors are a bit too bright for the dark page.
Re:Ask HN: Dark mode for HN please? by xingyzt on Saturday May 16, 2020 @12:45AM (#23200559)
append brightness(.9) to the end of the filter
Re:Ask HN: Dark mode for HN please? by californical on Saturday May 16, 2020 @02:58AM (#23201079)
This is the hacker-est option, I love it. So simple