4 ms·
That resulting color space isn't perceptually uniform anymore. LCH is a hue-based version of LAB, which is perceptually uniform (when changing one dimension at
by jtolmar 9y ago
That resulting color space isn't perceptually uniform anymore.
LCH is a hue-based version of LAB, which is perceptually uniform (when changing one dimension at a time) and easy to read, but unfortunately the gamut of what's displayable on a screen when viewed in this space is weird and hard to work with programatically. Specifically the higher C values are only available for the upper middle L values, and are hue dependent.
You could "fix" this by stretching any one of the values to fit in gamut - pick two and use a percent of the max in-gamut value for the third. It looks like this space is LH+C%. But that makes the chroma (saturation) no longer uniform. You could also do HC+L%, which makes luminence (brightness) no longer uniform, and would do a weird thing where L=0 is only black when C=0. You could also do LC+H% which would have weird discontinuities in hue and be generally funky.
- runemadsen 9y agoAuthor here! Thanks for the comment. Just for some background info: This book is written for people who want to begin using code as a creative tool, and many readers just learned the basics of JavaScript. Color theory quickly gets extremely hardcore, so the emphasis here is to present an alternative to the standard color spaces that is easy to use in JS. I think that HSLuv solves that problem, and it has been very helpful for my students when I introduced it in undergrad classes. There are many other relevant perceptually uniform color spaces, but none of them are as easy to understand as HSLuv for students who already know sRGB HSL.