diff --git a/src/spaces/prophoto-linear.js b/src/spaces/prophoto-linear.js index 6e42d9822..35db73ba2 100644 --- a/src/spaces/prophoto-linear.js +++ b/src/spaces/prophoto-linear.js @@ -3,17 +3,18 @@ import XYZ_D50 from "./xyz-d50.js"; // convert an array of prophoto-rgb values to CIE XYZ // using D50 (so no chromatic adaptation needed afterwards) -// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html +// matrix cannot be expressed in rational form, but is calculated to 64 bit accuracy +// see https://github.com/w3c/csswg-drafts/issues/7675 const toXYZ_M = [ - [ 0.7977604896723027, 0.13518583717574031, 0.0313493495815248 ], - [ 0.2880711282292934, 0.7118432178101014, 0.00008565396060525902 ], - [ 0.0, 0.0, 0.8251046025104601 ] + [ 0.79776664490064230, 0.13518129740053308, 0.03134773412839220 ], + [ 0.28807482881940130, 0.71183523424187300, 0.00008993693872564 ], + [ 0.00000000000000000, 0.00000000000000000, 0.82510460251046020 ] ]; const fromXYZ_M = [ - [ 1.3457989731028281, -0.25558010007997534, -0.05110628506753401 ], - [ -0.5446224939028347, 1.5082327413132781, 0.02053603239147973 ], - [ 0.0, 0.0, 1.2119675456389454 ] + [ 1.34578688164715830, -0.25557208737979464, -0.05110186497554526 ], + [ -0.54463070512490190, 1.50824774284514680, 0.02052744743642139 ], + [ 0.00000000000000000, 0.00000000000000000, 1.21196754563894520 ] ]; export default new RGBColorSpace({