Skip to content

Commit 5ae7930

Browse files
committed
[css-color-4] use correct inverse matrix for D50 to D65
1 parent 7b47e34 commit 5ae7930

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

css-color-4/conversions.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,11 @@ function D65_to_D50(XYZ) {
318318

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

327328
return multiplyMatrices(M, XYZ);

0 commit comments

Comments
 (0)