This is great, thank you for sharing. I need something like this for my current project I'm working on... Much easier than trying to build a color palette manually.
I also recommend Color Brewer, which is integrated already in a lot of visualization tools, and has great options for display variants and accessibility options : https://en.wikipedia.org/wiki/ColorBrewer
It's functionally very close to https://colorbrewer2.org, which has been online for more than 15 years. I think it's not a coincidence, and some credits wouldn't have hurt anyone...
Also, I have personally been using iWantHue to generate large palettes for more than 10 years now, and I'm still very happy about it:
https://medialab.github.io/iwanthue/
See Fabio Crameri's colour maps for accessible yet pleasing schemes and gradients to accustom various vision impairments [0][1]. Ben Jann's collection also provides a valuable resource and inventory of recent and historic colour schemes included in different statistical packages [2].
Careful, this is really not good for folks who are color blind. In chromium devtools you can enable various color blind emulations in the device emulation menu. ctrl+shift+P -> "Protanopia"
I myself implemented 4 colorize functions for that.
Common linear Blue -> Red. Linear Blue -> Red adjusted via Green for visibility.
Blue -> Yellow -> Red also linear. And of course Turbo from that blog..
16 comments
[ 3.5 ms ] story [ 29.3 ms ] threadAlso, I have personally been using iWantHue to generate large palettes for more than 10 years now, and I'm still very happy about it: https://medialab.github.io/iwanthue/
[0]: https://www.fabiocrameri.ch/ws/alt-imgs/w800/f19552bb8a98e32...
[1]: https://www.fabiocrameri.ch/colourmaps/
[2]: https://repec.sowi.unibe.ch/stata/palettes/colors.html
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorials/S...
https://colorcet.com/
https://research.google/blog/turbo-an-improved-rainbow-color...
I myself implemented 4 colorize functions for that. Common linear Blue -> Red. Linear Blue -> Red adjusted via Green for visibility. Blue -> Yellow -> Red also linear. And of course Turbo from that blog..