[squeak-dev] Colour visualisation & mapping info

tim Rowledge tim at rowledge.org
Wed May 18 19:33:02 UTC 2022


From time to time we have to think about how we handle colours and gradients; it's a quite complex subject that mixes physics and biology.

An acquaintance at UBC teaches this subject and recently posted to another list, and gave me permission to share -

> Hi folks,
> Delurking for the first time in quite a while to weigh in, I do teach about
> color and color perception.
> 
> In short:  The right color space to use for interpolating colors is CIELAB
> (aka L*a*b* or LAB or Lab), which is carefully designed to be perceptually
> uniform.  RGB is dramatically non-uniform, do not interpolate in that color
> space because you're in for a world of hurt. Unfortunately, while HSV/HSL
> is more uniform than RGB in the colorful dimensions, it isn't truly uniform
> either in the black-and-white dimension, so it's not a good bet. If you do
> the math in the CIELAB space you don't need to think about gamma
> correction, that will just confuse the issue.
> 
> Tools:
> Example D3 code plus explanations from Mike Bostock at
> https://bl.ocks.org/mbostock/3014589
> 
> Observable notebook with some examples and analysis of interpolation in
> different color spaces from Zan Armstrong at
> https://observablehq.com/@zanarmstrong/comparing-interpolating-in-different-color-spaces
> 
> Interactive demos from Carlos Scheidegger at
> https://cscheid.net/projects/color-interpolation/
> 
> LAB/Lch  color gradient generator at
> https://davidjohnstone.net/lch-lab-colour-gradient-picker
> 
> Older but in-depth post from Gregor Aisch (with a lot of commentary from
> experts below) at
> https://www.vis4.net/blog/2011/12/avoid-equidistant-hsv-colors/
> 
> In long: For more on color here's the three relevant videos from my
> visualization course. The third one goes a bit into the question of color
> spaces in the first seven minutes, but it might make more sense if you
> watch the first one to establish some basics first. The second one is
> mostly focused on the issue of colorblindness.
> 
> Color I (19 min)
> https://www.youtube.com/watch?v=QNDd_hvdORw&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=15
> Color II (6 min)
> https://www.youtube.com/watch?v=yUsL6a1d9n0&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=16
> Color III (18 min)
> https://www.youtube.com/watch?v=zt8uIbSMeFg&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=17
> 
> Cheers, Tamara
> ----
> Tamara Munzner
> Professor, Department of Computer Science, University of British Columbia


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
I majored in Art and Logic. Now I draw my own conclusions




More information about the Squeak-dev mailing list