Improve chromatic adaptation API
Ogeon opened this issue · 0 comments
Ogeon commented
Description
The traits in chromatic_adaptation
have turned out to "do too much". They both adapt white spaces and convert between color spaces. I'm thinking they could be changed to apply to Xyz
only, since that's the space where it's done, and leave any conversion to the user. That way we don't force any kind of clamping and don't do anything else that may be surprising or unnecessarily destructive.
For extra flexibility, though, we could add a function that takes any source and destination white space, with Xyz<Any, T>
parameters. A light source, for example, may not necessarily match a static white point.
Motivation
I want to remove hidden side effects and make them Do One Thing. Plus detailed control.