Skip to content

Commit

Permalink
[css-color-4] use correct inverse matrix for D50 to D65
Browse files Browse the repository at this point in the history
  • Loading branch information
svgeesus committed Nov 24, 2023
1 parent 7b47e34 commit 5ae7930
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions css-color-4/conversions.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,11 @@ function D65_to_D50(XYZ) {

function D50_to_D65(XYZ) {
// Bradford chromatic adaptation from D50 to D65
// See https://github.com/LeaVerou/color.js/pull/360/files
var M = [
[ 0.947386632323667, 0.28196156725620036, -0.1708280666484637 ],
[ -0.7357288996314816, 1.6804471734451398, 0.035992069603406264 ],
[ 0.029218329379919382, -0.05145129980782719, 0.7733468362356041 ]
[ 0.955473421488075, -0.02309845494876471, 0.06325924320057072 ],
[ -0.0283697093338637, 1.0099953980813041, 0.021041441191917323 ],
[ 0.012314014864481998, -0.020507649298898964, 1.330365926242124 ]
];

return multiplyMatrices(M, XYZ);
Expand Down

0 comments on commit 5ae7930

Please sign in to comment.