-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor XYZ color space into its own module. #84
base: main
Are you sure you want to change the base?
Conversation
This looks like a worthwhile refactoring and I’m in favor of exporting d3.xyz. 👍 |
@mbostock the PR is ready for review |
Per @danburzo’s comment #51 (comment), what do you think about the choice of illuminant (D65 vs. D50)? One possibility is that the XYZ class has a field which stores the illuminant ( Also, does this PR affect the performance of converting between Lab and RGB because it now makes explicit the extra chromatic adaptation step rather than combining it into the matrix multiplication? |
See my comment on #51
Is there a benchmark you use for this? How have you tested performance impact in the past? |
@mbostock friendly ping |
In a recent addition to the css-color-4 spec, @svgeesus has made the following adjustments as per w3c/csswg-drafts#6722:
These are all predefined color profiles for the
|
For #51
Refactors the implementation of the XYZ color space (i.e. CIE XYZ D50) out of
src/lab.js
into its own module,src/xyz.js
.