Mike Bostock
Mike Bostock
Okay. I think I’ll just keep everything existing as-is, improve the documentation, and introduce: * d3.luv = CIELUV * d3.lchuv = CIELCh_uv * d3.xyz = CIEXYZ
Per #84 and #51, sounds like we’d want two or possibly three for XYZ due to the choice of illuminants. So, I think this is the latest list? * d3.luv...
Do any browsers support this yet? I’d be more inclined to add it if it had browser support.
Yes, that’s a good idea. There’s a nice implementation here by Jacob Rus: https://observablehq.com/@jrus/jzazbz
Hmm, we already clamp to [0, 255] when formatting RGB as a string: https://github.com/d3/d3-color/blob/8c37e329194cb295455f12596a227dd4aaad72b7/src/color.js#L241-L248 So, maybe we don’t need this after all?
Nice! Chroma clamping is definitely noticeable when L is high. I bet there is a closed form to do the clamping… but I’m not sure I’ll be able to figure...
A cubehelix disk, for fun: ```js disc((r,t) => d3.cubehelix(t, 1, Math.sqrt(1 - r / 256))) ``` 
Interestingly, in my effort to fix achromatic interpolation, I’ve exacerbated the problem described in this issue: now when interpolating from black in HCL space, we use black with non-zero chroma,...
Here’s a working prototype using Dan’s bisection method for chroma clamping: https://observablehq.com/d/3cef25e76ec972cf