node/colorjs.io/src/spaces/a98rgb.js
raw| 1 | import RGBColorSpace from "../RGBColorSpace.js"; |
| 2 | import A98Linear from "./a98rgb-linear.js"; |
| 3 | |
| 4 | export default new RGBColorSpace({ |
| 5 | id: "a98rgb", |
| 6 | cssId: "a98-rgb", |
| 7 | name: "Adobe® 98 RGB compatible", |
| 8 | base: A98Linear, |
| 9 | linearGamut: A98Linear, |
| 10 | toBase: RGB => RGB.map(val => Math.pow(Math.abs(val), 563 / 256) * Math.sign(val)), |
| 11 | fromBase: RGB => RGB.map(val => Math.pow(Math.abs(val), 256 / 563) * Math.sign(val)), |
| 12 | }); |