Give Your Illustrations Dark Mode With This Simple Trick (SPOILER: It's a CSS Filter) was first published on Farai's Codelab.
filter: invert(100%);
—that’s it!
Ok fine, it won’t work all most of the time (it’s terrible on actual photos) but it’s good for illustrations with simple color palettes, like xkcd comics.
On my site, I put that CSS in a class invert-hack
which I place on any illustrations I want to flip to dark mode.
Thanks for reading! If you liked this post, consider supporting my work by:
- sharing my work,
- refering me for a job (or hire me for freelance work),
- sponsoring me on Patreon,
- buying Me A Coffee,
- buying Me A Ko-Fi,
- sending me a tip on Paypal,
-
buy something on Amazon with my affiliate link (I’ll earn a commision on this as an amazon affiliate), - or buy a domain on Namecheap with my affiliate link.
You can also subscribe to my newsletter.
Have feedback? Send an email to gandiyafarai+feedback at gmail dot com
Top comments (0)