<div dir="auto"><div>I work in photographic printing, so am intimately familiar with this.</div><div dir="auto"><br></div><div dir="auto">There's also the matter of self-luminous colors... when others would be black, very pure reds and blues will still appear colorful. You need to be careful with this when it comes to user friendliness; dark red and dark blue text on a black background or inverted is, for practical purposes, black on black.</div><div dir="auto"><br></div><div dir="auto">This becomes very obvious when you convert an RGB image to only the L* component!</div><div dir="auto"><br></div><div dir="auto">Even rudimentary CIELab support, for showing a read-only greyscale copy of a form, would help in identifying accessibility issues.</div><div dir="auto"><br></div><div dir="auto">On the other hand, Lab color is totally unintuitive to work in as input unless you limit yourself to the brightness component only. I think it would only confuse users to present it as a color picker, like the HSL wheel.</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, May 18, 2022, 13:33 tim Rowledge <<a href="mailto:tim@rowledge.org">tim@rowledge.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>
<br>
An acquaintance at UBC teaches this subject and recently posted to another list, and gave me permission to share -<br>
<br>
> Hi folks,<br>
> Delurking for the first time in quite a while to weigh in, I do teach about<br>
> color and color perception.<br>
> <br>
> In short:  The right color space to use for interpolating colors is CIELAB<br>
> (aka L*a*b* or LAB or Lab), which is carefully designed to be perceptually<br>
> uniform.  RGB is dramatically non-uniform, do not interpolate in that color<br>
> space because you're in for a world of hurt. Unfortunately, while HSV/HSL<br>
> is more uniform than RGB in the colorful dimensions, it isn't truly uniform<br>
> either in the black-and-white dimension, so it's not a good bet. If you do<br>
> the math in the CIELAB space you don't need to think about gamma<br>
> correction, that will just confuse the issue.<br>
> <br>
> Tools:<br>
> Example D3 code plus explanations from Mike Bostock at<br>
> <a href="https://bl.ocks.org/mbostock/3014589" rel="noreferrer noreferrer" target="_blank">https://bl.ocks.org/mbostock/3014589</a><br>
> <br>
> Observable notebook with some examples and analysis of interpolation in<br>
> different color spaces from Zan Armstrong at<br>
> <a href="https://observablehq.com/@zanarmstrong/comparing-interpolating-in-different-color-spaces" rel="noreferrer noreferrer" target="_blank">https://observablehq.com/@zanarmstrong/comparing-interpolating-in-different-color-spaces</a><br>
> <br>
> Interactive demos from Carlos Scheidegger at<br>
> <a href="https://cscheid.net/projects/color-interpolation/" rel="noreferrer noreferrer" target="_blank">https://cscheid.net/projects/color-interpolation/</a><br>
> <br>
> LAB/Lch  color gradient generator at<br>
> <a href="https://davidjohnstone.net/lch-lab-colour-gradient-picker" rel="noreferrer noreferrer" target="_blank">https://davidjohnstone.net/lch-lab-colour-gradient-picker</a><br>
> <br>
> Older but in-depth post from Gregor Aisch (with a lot of commentary from<br>
> experts below) at<br>
> <a href="https://www.vis4.net/blog/2011/12/avoid-equidistant-hsv-colors/" rel="noreferrer noreferrer" target="_blank">https://www.vis4.net/blog/2011/12/avoid-equidistant-hsv-colors/</a><br>
> <br>
> In long: For more on color here's the three relevant videos from my<br>
> visualization course. The third one goes a bit into the question of color<br>
> spaces in the first seven minutes, but it might make more sense if you<br>
> watch the first one to establish some basics first. The second one is<br>
> mostly focused on the issue of colorblindness.<br>
> <br>
> Color I (19 min)<br>
> <a href="https://www.youtube.com/watch?v=QNDd_hvdORw&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=15" rel="noreferrer noreferrer" target="_blank">https://www.youtube.com/watch?v=QNDd_hvdORw&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=15</a><br>
> Color II (6 min)<br>
> <a href="https://www.youtube.com/watch?v=yUsL6a1d9n0&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=16" rel="noreferrer noreferrer" target="_blank">https://www.youtube.com/watch?v=yUsL6a1d9n0&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=16</a><br>
> Color III (18 min)<br>
> <a href="https://www.youtube.com/watch?v=zt8uIbSMeFg&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=17" rel="noreferrer noreferrer" target="_blank">https://www.youtube.com/watch?v=zt8uIbSMeFg&list=PLT4XLHmqHJBeB5LwmRmo6ln-m7K3lGvrk&index=17</a><br>
> <br>
> Cheers, Tamara<br>
> ----<br>
> Tamara Munzner<br>
> Professor, Department of Computer Science, University of British Columbia<br>
<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank" rel="noreferrer">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
I majored in Art and Logic. Now I draw my own conclusions<br>
<br>
<br>
<br>
</blockquote></div></div></div>