Re: [csswg-drafts] [css-color-5] add target contrast ratio to color-contrast? (#4749)

Thank you for sharing the link Mike, that's correct. 

_Quick caveat, sorry if this is not the appropriate location for this discussion_

CIECAM02 is a perceptual adaptation of CIELAB colorspace, and the d3-module allows us to leverage it as an optional color space for interpolation. Some of the interest in providing CAM02 has been inspired by the creation of Viridis, Magma, Inferno, and Plasma (from CRAN: https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html). These scales were created by drawing a bezier curve within a confined plane of CAM02 space in order to leverage its perceptual uniformity. There's a great walkthrough they give here: https://www.youtube.com/watch?list=PLYx7XA2nY5Gcpabmu61kKcToLz0FapmHu&v=xAoljeRJ3lU. 

When evaluating these scales and seeing the smooth transitions between hue and chroma, it makes sense (from a designers perspective) that these follow a smooth curve. However, in other color spaces (including Lab/LCh), a smooth curve *does not* produce a perceptually smooth transition. Albeit this is case-by-case, and certain cases are not as clearly different. 

For example, here's a comparison of a smooth (bezier) interpolation between three key (sample) colors (#FDE725, #218F8D, #440154). One is a smooth transition in LCh, the other is in CAM02. In this particular case, CAM02 provides a much smoother transition between colors. Mapping these interpolation paths also made it clear how irregular the interpolation path is in LCh.
![image](https://user-images.githubusercontent.com/13972198/80122393-b80aa180-854a-11ea-8c5c-b2752b6a2e59.png)


**Why am I going on this tangent?**
First, many of the same problems that a user would encounter when creating a sequential scale for data visualization are shared by users determining how to adjust tints and shades of a color in order to lighten/darken for a particular contrast output. 

Secondly, _LCh will not solve all your problems_. :-) 

Anyway, all this is to shed light on the problem I've already expressed, so I hope this is not too redundant or unnecessary. The utility expressed in the description of this issue seems to meet what I'd expect/hope for. Looking forward to seeing where this goes 👍 

-- 
GitHub Notification of comment by NateBaldwinDesign
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4749#issuecomment-618494495 using your GitHub account

Received on Thursday, 23 April 2020 16:17:29 UTC