We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2d6d38 commit 6407b4eCopy full SHA for 6407b4e
css-color-4/conversions.js
@@ -410,6 +410,9 @@ function XYZ_to_OKLab(XYZ) {
410
];
411
412
var LMS = multiplyMatrices(XYZtoLMS, XYZ);
413
+ // JavaScript Math.cbrt returns a sign-matched cube root
414
+ // beware if porting to other languages
415
+ // especially if tempted to use a general power function
416
return multiplyMatrices(LMStoOKLab, LMS.map(c => Math.cbrt(c)));
417
// L in range [0,1]. For use in CSS, multiply by 100 and add a percent
418
}
0 commit comments