Live data from Hacker News

Show HN: Darken – Darkmode Made Easy

github.com

1–10 of 61 posts

Re: Show HN: Darken – Darkmode Made Easy

#3
post #2

what’s the intended use case?

It turns light colored websites into dark websites [1][2][3].

Here is an example: https://colinespinas.github.io/darken/

[1] https://support.apple.com/en-ca/HT208976

[2] https://css-tricks.com/dark-modes-with-css/

[3] https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...

Re: Show HN: Darken – Darkmode Made Easy

#5
Why would you prefer this over, as another commenter already pointed out, a web standard like the CSS `prefers-color-scheme` media feature? A web feature like that works across websites, is better equipped to deal with user accessibility issues, and doesn't require Javascript.

Re: Show HN: Darken – Darkmode Made Easy

#6
post #5

Why would you prefer this over, as another commenter already pointed out, a web standard like the CSS `prefers-color-scheme` media feature? A web feature like that works across websites, is better equipped to deal with user accessibility issues, and doesn't require Javascript.

The use case is different, the standard CSS `prefers-color-scheme` media feature changes the styles according to your system preferences. Here, the goal is to offer to the developer a simple API to create a customizable darkmode feature. I've just started writing this API but I intend to make it more customizable by including `prefers-color-scheme` option and timestamps based darkmode.

I hope it make the thing more clear.

Re: Show HN: Darken – Darkmode Made Easy

#10
If you need an extremely quick way to implement dark mode, you can use the darkreader[0] npm package. I set it up for our app in ~30 mins.

The only big downside I've seen so far is performance, but I haven't quantified it yet.

[0] https://github.com/darkreader/darkreader#using-for-a-website

Post reply on HN