Open gampleman opened 4 years ago
Thanks for taking the time to put this together, and sorry for the slow reply.
My current goal for this package is to be a minimal API that allows other packages to have a common Color
type that they can all use. With that goal in mind, I'm avoiding add all possible colorspace conversions and trying to keep this package as small as reasonably possible.
Would you be interested in making a separate package for these additional color space conversions? If you do publish one, I'd be happy to link to it in the README for this package.
In any case, I'll leave this PR open for further discussion and for reference.
This PR adds the math to specify and output colors in the CIELAB and HCL color spaces.
These are especially useful for information visualization as they are perceptually uniform, but are also suitable for color manipulation and UI tasks, like generating palettes or themes.
There are some open API design questions/caveats:
L*
,a*
andb*
. This makes the record a bit awkward...NaN
values for hue and chroma for black, white, andNaN
chroma for grays.I would be grateful for direction on the above points.