4 ms·
Good stuff, except for the rainbow color scales [1]. I'd much prefer to see the same in viridis [2] or something similar. The color boundaries on the rainbow sc
by 0xBABAD00C 9y ago
Good stuff, except for the rainbow color scales [1]. I'd much prefer to see the same in viridis [2] or something similar. The color boundaries on the rainbow scale are not perceived uniformly by human eyes (there might even be a cultural bias at play, i.e. we may distinguish blue from green more readily than different shades of blue, even if they may be objectively at the same distance)
[1] https://visual.ly/blog/rainbow-color-scales/ https://visual.ly/blog/rainbow-color-scales/
[2] https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html https://cran.r-project.org/web/packages/viridis/vignettes/in...
Edit:
Here's my demo, in Viridis: http://gph.is/2xZnKxl http://gph.is/2xZnKxl
(Generated in ipython + numpy + matplotlib + seaborn)
- sillysaurus3 9y agoNit: "distance" in color space is fiendishly difficult to define. It's not as simple as treating RGB as cartesian coordinates and computing the distance algorithm. So, yes, everything you said, and then some.
- reikonomusha 9y agoSorting is about relative distance anyway. “Am I closer than you to negative infinity?” Why does having absolute perception matter? (Indeed, all but radix sort use comparison-based strategies. There’s some notion of a “less than” operation being used to make decisions.) Viridis is useful for scientific plots where scale perception is important in making a good conclusion. I don’t think demonstrating sorting requires the same perception.
- deleted 9y ago[deleted]
- Sharlin 9y agoOne real problem in using the hue component of HSL is that it wraps around perceptually by design. There's no "greatest" or "least" hue. And the ordering isn't exactly intuitive because we don't perceive colors based on the order of their respective wavelengths on the EM spectrum. Varying the saturation or luminance component while keeping the other two constant makes it much easier to perceive the relationship of two colors at a glance. Or just take a gradient between two appropriately contrasting colors which is exactly what viridis is about.
- XaspR8d 9y agoOr if you still want a rainbow to satisfy personal design desires, cubehelix and HCL both provide great perceptively-balanced scales. That said, I usually prefer subsets, like viridis.
- microcolonel 9y ago> there might even be a cultural bias at play, Nope, thankfully no cultural bias in the distinction of hues and shades (and especially gradients), only in the number of standard words to describe them. This makes it easier to be sure of how swell viridis/inferno are.