| 1 |
import RGBColorSpace from "../RGBColorSpace.js"; |
| 2 |
|
| 3 |
/** @import { Matrix3x3 } from "../types.js" */ |
| 4 |
|
| 5 |
/** |
| 6 |
* Matrices used by this color space, also available as `P3_Linear.M` |
| 7 |
* @type {Record<string, Matrix3x3>} |
| 8 |
*/ |
| 9 |
// prettier-ignore |
| 10 |
export const M = { |
| 11 |
toXYZ: [ |
| 12 |
[0.4865709486482162, 0.26566769316909306, 0.1982172852343625], |
| 13 |
[0.2289745640697488, 0.6917385218365064, 0.079286914093745], |
| 14 |
[0.0000000000000000, 0.04511338185890264, 1.043944368900976], |
| 15 |
], |
| 16 |
fromXYZ: [ |
| 17 |
[ 2.493496911941425, -0.9313836179191239, -0.40271078445071684], |
| 18 |
[-0.8294889695615747, 1.7626640603183463, 0.023624685841943577], |
| 19 |
[ 0.03584583024378447, -0.07617238926804182, 0.9568845240076872], |
| 20 |
], |
| 21 |
}; |
| 22 |
|
| 23 |
export default new RGBColorSpace({ |
| 24 |
id: "p3-linear", |
| 25 |
cssId: "display-p3-linear", |
| 26 |
name: "Linear P3", |
| 27 |
white: "D65", |
| 28 |
M, |
| 29 |
}); |