color-bits 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/README.md +30 -14
  3. package/benchmarks/compare-oklab.ts +44 -0
  4. package/benchmarks/compare-srgb.ts +59 -0
  5. package/benchmarks/compare.ts +46 -0
  6. package/benchmarks/parse.ts +41 -0
  7. package/build/conversion/channels.d.ts +61 -0
  8. package/build/conversion/channels.js +353 -0
  9. package/build/conversion/channels.js.map +1 -0
  10. package/build/{convert.d.ts → conversion/color-spaces.d.ts} +25 -23
  11. package/build/conversion/color-spaces.js +263 -0
  12. package/build/conversion/color-spaces.js.map +1 -0
  13. package/build/core/bits.d.ts +28 -0
  14. package/build/{core.js → core/bits.js} +25 -26
  15. package/build/core/bits.js.map +1 -0
  16. package/build/core/bytes.d.ts +5 -0
  17. package/build/core/bytes.js +12 -0
  18. package/build/core/bytes.js.map +1 -0
  19. package/build/css.d.ts +1 -0
  20. package/build/css.js +18 -0
  21. package/build/css.js.map +1 -0
  22. package/build/formatting/index.d.ts +27 -0
  23. package/build/{format.js → formatting/index.js} +13 -67
  24. package/build/formatting/index.js.map +1 -0
  25. package/build/index.d.ts +6 -4
  26. package/build/index.js +6 -4
  27. package/build/index.js.map +1 -1
  28. package/build/namedColors.d.ts +1 -0
  29. package/build/namedColors.js +18 -0
  30. package/build/namedColors.js.map +1 -0
  31. package/build/operations/adjust.d.ts +19 -0
  32. package/build/operations/adjust.js +40 -0
  33. package/build/operations/adjust.js.map +1 -0
  34. package/build/operations/blend.d.ts +9 -0
  35. package/build/operations/blend.js +19 -0
  36. package/build/operations/blend.js.map +1 -0
  37. package/build/operations/color-mix.d.ts +20 -0
  38. package/build/operations/color-mix.js +144 -0
  39. package/build/operations/color-mix.js.map +1 -0
  40. package/build/operations/luminance.d.ts +7 -0
  41. package/build/operations/luminance.js +20 -0
  42. package/build/operations/luminance.js.map +1 -0
  43. package/build/parsing/calc.d.ts +8 -0
  44. package/build/parsing/calc.js +205 -0
  45. package/build/parsing/calc.js.map +1 -0
  46. package/build/parsing/color-mix.d.ts +8 -0
  47. package/build/parsing/color-mix.js +70 -0
  48. package/build/parsing/color-mix.js.map +1 -0
  49. package/build/parsing/css.d.ts +23 -0
  50. package/build/parsing/css.js +115 -0
  51. package/build/parsing/css.js.map +1 -0
  52. package/build/parsing/fast.d.ts +19 -0
  53. package/build/parsing/fast.js +184 -0
  54. package/build/parsing/fast.js.map +1 -0
  55. package/build/parsing/named-colors.d.ts +12 -0
  56. package/build/parsing/named-colors.js +68 -0
  57. package/build/parsing/named-colors.js.map +1 -0
  58. package/build/parsing/relative.d.ts +9 -0
  59. package/build/parsing/relative.js +158 -0
  60. package/build/parsing/relative.js.map +1 -0
  61. package/build/parsing/tokenizer.d.ts +16 -0
  62. package/build/parsing/tokenizer.js +78 -0
  63. package/build/parsing/tokenizer.js.map +1 -0
  64. package/build/parsing/values.d.ts +41 -0
  65. package/build/parsing/values.js +139 -0
  66. package/build/parsing/values.js.map +1 -0
  67. package/package.json +30 -12
  68. package/benchmarks/index.ts +0 -35
  69. package/build/bit.d.ts +0 -3
  70. package/build/bit.js +0 -29
  71. package/build/bit.js.map +0 -1
  72. package/build/convert.js +0 -347
  73. package/build/convert.js.map +0 -1
  74. package/build/core.d.ts +0 -27
  75. package/build/core.js.map +0 -1
  76. package/build/format.d.ts +0 -27
  77. package/build/format.js.map +0 -1
  78. package/build/functions.d.ts +0 -33
  79. package/build/functions.js +0 -95
  80. package/build/functions.js.map +0 -1
  81. package/build/parse.d.ts +0 -17
  82. package/build/parse.js +0 -392
  83. package/build/parse.js.map +0 -1
@@ -0,0 +1,353 @@
1
+ "use strict";
2
+ // Canonical per-colorspace channel math, in CSS Color 4 "keyword" units:
3
+ //
4
+ // hsl: h in degrees, s/l in 0..100
5
+ // hwb: h in degrees, w/b in 0..100
6
+ // lab: l in 0..100, a/b raw (~ ±125)
7
+ // lch: l in 0..100, c raw (~0..150), h in degrees
8
+ // oklab: l in 0..1, a/b raw (~ ±0.4)
9
+ // oklch: l in 0..1, c raw (~0..0.4), h in degrees
10
+ // color(): channels in 0..1
11
+ //
12
+ // The forward direction (`*ToColor`) takes these units plus an alpha byte and
13
+ // returns ColorBits directly — no intermediate array, so the hot HSL/HWB paths
14
+ // allocate nothing. The reverse direction (`srgbTo*`) takes sRGB in [0, 1] and
15
+ // writes the channel values into a caller-owned buffer it returns, for binding
16
+ // relative-color keywords and for color-mix(). Both the fast parser and the
17
+ // relative parser route through here, guaranteeing identical results for the
18
+ // same nominal color.
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.srgbToColor = srgbToColor;
21
+ exports.hslToColor = hslToColor;
22
+ exports.srgbToHsl = srgbToHsl;
23
+ exports.hwbToColor = hwbToColor;
24
+ exports.srgbToHwb = srgbToHwb;
25
+ exports.labToColor = labToColor;
26
+ exports.srgbToLab = srgbToLab;
27
+ exports.lchToColor = lchToColor;
28
+ exports.srgbToLch = srgbToLch;
29
+ exports.oklabToColor = oklabToColor;
30
+ exports.srgbToOklab = srgbToOklab;
31
+ exports.oklchToColor = oklchToColor;
32
+ exports.srgbToOklch = srgbToOklch;
33
+ exports.colorSpaceChannels = colorSpaceChannels;
34
+ exports.colorSpaceToSrgb = colorSpaceToSrgb;
35
+ exports.colorSpaceToColor = colorSpaceToColor;
36
+ exports.srgbToColorSpace = srgbToColorSpace;
37
+ exports.colorModel = colorModel;
38
+ exports.colorSpaceModel = colorSpaceModel;
39
+ const bits_1 = require("../core/bits");
40
+ const bytes_1 = require("../core/bytes");
41
+ const color_spaces_1 = require("./color-spaces");
42
+ // Single scratch buffer for the *ToColor chains, which have no out parameter
43
+ // of their own. Safe to share: conversions are synchronous, never reentrant,
44
+ // and results are read out before the next conversion runs.
45
+ const SCRATCH = new Float64Array(3);
46
+ /** sRGB component in [0, 1] -> clamped byte in [0, 255]. */
47
+ function to255(v) {
48
+ return (0, bytes_1.clampByte)(v * 255);
49
+ }
50
+ /** Build ColorBits from sRGB components in [0, 1] and an alpha byte (0..255). */
51
+ function srgbToColor(r, g, b, a) {
52
+ return (0, bits_1.newColor)(to255(r), to255(g), to255(b), a);
53
+ }
54
+ // HSL
55
+ // t must be within [-1, 2): a single ±1 wrap brings it into [0, 1). Callers
56
+ // guarantee this by normalizing the hue first, so t = h/360 ± 1/3 ∈ [-1/3, 4/3).
57
+ function hueToRGB(p, q, t) {
58
+ if (t < 0) {
59
+ t += 1;
60
+ }
61
+ if (t > 1) {
62
+ t -= 1;
63
+ }
64
+ if (t < 1 / 6) {
65
+ return p + (q - p) * 6 * t;
66
+ }
67
+ if (t < 1 / 2) {
68
+ return q;
69
+ }
70
+ if (t < 2 / 3) {
71
+ return p + (q - p) * (2 / 3 - t) * 6;
72
+ }
73
+ return p;
74
+ }
75
+ /**
76
+ * @param h degrees, any value (wrapped by 360°)
77
+ * @param s nominally 0..100 (clamped)
78
+ * @param l nominally 0..100 (clamped)
79
+ * @param a alpha byte
80
+ */
81
+ function hslToColor(h, s, l, a) {
82
+ // CSS: hue wraps by 360°; saturation/lightness clamp to [0%, 100%]. The
83
+ // wrap stays in degrees where the modulo is exact for integer hues.
84
+ if (h < 0 || h >= 360) {
85
+ h = ((h % 360) + 360) % 360;
86
+ }
87
+ if (s < 0) {
88
+ s = 0;
89
+ }
90
+ else if (s > 100) {
91
+ s = 100;
92
+ }
93
+ if (l < 0) {
94
+ l = 0;
95
+ }
96
+ else if (l > 100) {
97
+ l = 100;
98
+ }
99
+ h /= 360;
100
+ s /= 100;
101
+ l /= 100;
102
+ // With s and l clamped, all channels stay in [0, 1]: no clamping needed.
103
+ let r, g, b;
104
+ if (s === 0) {
105
+ r = g = b = Math.round(l * 255); // achromatic
106
+ }
107
+ else {
108
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
109
+ const p = 2 * l - q;
110
+ r = Math.round(hueToRGB(p, q, h + 1 / 3) * 255);
111
+ g = Math.round(hueToRGB(p, q, h) * 255);
112
+ b = Math.round(hueToRGB(p, q, h - 1 / 3) * 255);
113
+ }
114
+ return (0, bits_1.newColor)(r, g, b, a);
115
+ }
116
+ // https://www.30secondsofcode.org/js/s/rgb-hex-hsl-hsb-color-format-conversion/
117
+ /** @param sRGB in [0, 1] @returns out as [h degrees, s 0..100, l 0..100] */
118
+ function srgbToHsl(r, g, b, out) {
119
+ const max = Math.max(r, g, b);
120
+ const s = max - Math.min(r, g, b);
121
+ const h = s
122
+ ? max === r
123
+ ? (g - b) / s
124
+ : max === g
125
+ ? 2 + (b - r) / s
126
+ : 4 + (r - g) / s
127
+ : 0;
128
+ // Saturation branches on lightness (= (2*max - s) / 2), not on max.
129
+ out[0] = 60 * h < 0 ? 60 * h + 360 : 60 * h;
130
+ out[1] = 100 * (s ? (2 * max - s <= 1 ? s / (2 * max - s) : s / (2 - (2 * max - s))) : 0);
131
+ out[2] = (100 * (2 * max - s)) / 2;
132
+ return out;
133
+ }
134
+ // HWB
135
+ /**
136
+ * @param h degrees, any value (wrapped by 360°)
137
+ * @param w nominally 0..100 (clamped)
138
+ * @param b nominally 0..100 (clamped)
139
+ * @param a alpha byte
140
+ */
141
+ function hwbToColor(h, w, b, a) {
142
+ // CSS: hue wraps by 360°; whiteness/blackness clamp to [0%, 100%]
143
+ if (h < 0 || h >= 360) {
144
+ h = ((h % 360) + 360) % 360;
145
+ }
146
+ if (w < 0) {
147
+ w = 0;
148
+ }
149
+ else if (w > 100) {
150
+ w = 100;
151
+ }
152
+ if (b < 0) {
153
+ b = 0;
154
+ }
155
+ else if (b > 100) {
156
+ b = 100;
157
+ }
158
+ w /= 100;
159
+ b /= 100;
160
+ h /= 360;
161
+ // https://drafts.csswg.org/css-color-4/#hwb-to-rgb
162
+ if (w + b >= 1) {
163
+ const gray = to255(w / (w + b)); // achromatic
164
+ return (0, bits_1.newColor)(gray, gray, gray, a);
165
+ }
166
+ // Pure hue (HSL with s = 1, l = 0.5 reduces to p = 0, q = 1), then apply
167
+ // whiteness/blackness: channel * (1 - w - b) + w. With w and b clamped and
168
+ // w + b < 1, the result stays in [0, 1]: no clamping needed.
169
+ const scale = 1 - w - b;
170
+ return (0, bits_1.newColor)(Math.round((hueToRGB(0, 1, h + 1 / 3) * scale + w) * 255), Math.round((hueToRGB(0, 1, h) * scale + w) * 255), Math.round((hueToRGB(0, 1, h - 1 / 3) * scale + w) * 255), a);
171
+ }
172
+ // https://stackoverflow.com/a/29463581/3112706
173
+ /** @param sRGB in [0, 1] @returns out as [h degrees, w 0..100, b 0..100] */
174
+ function srgbToHwb(r, g, b, out) {
175
+ srgbToHsl(r, g, b, out);
176
+ out[1] = Math.min(r, g, b) * 100;
177
+ out[2] = (1 - Math.max(r, g, b)) * 100;
178
+ return out;
179
+ }
180
+ // Lab / LCH
181
+ /** @param l 0..100 @param a raw @param b raw @param alpha alpha byte */
182
+ function labToColor(l, a, b, alpha) {
183
+ (0, color_spaces_1.labToXyzd50)(l, a, b, SCRATCH);
184
+ (0, color_spaces_1.xyzd50ToSrgb)(SCRATCH[0], SCRATCH[1], SCRATCH[2], SCRATCH);
185
+ return srgbToColor(SCRATCH[0], SCRATCH[1], SCRATCH[2], alpha);
186
+ }
187
+ /** @param sRGB in [0, 1] @returns out as [l 0..100, a raw, b raw] */
188
+ function srgbToLab(r, g, b, out) {
189
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
190
+ return (0, color_spaces_1.xyzd50ToLab)(out[0], out[1], out[2], out);
191
+ }
192
+ /** @param l 0..100 @param c raw @param h degrees @param alpha alpha byte */
193
+ function lchToColor(l, c, h, alpha) {
194
+ (0, color_spaces_1.lchToLab)(l, c, h, SCRATCH);
195
+ (0, color_spaces_1.labToXyzd50)(SCRATCH[0], SCRATCH[1], SCRATCH[2], SCRATCH);
196
+ (0, color_spaces_1.xyzd50ToSrgb)(SCRATCH[0], SCRATCH[1], SCRATCH[2], SCRATCH);
197
+ return srgbToColor(SCRATCH[0], SCRATCH[1], SCRATCH[2], alpha);
198
+ }
199
+ /** @param sRGB in [0, 1] @returns out as [l 0..100, c raw, h degrees] */
200
+ function srgbToLch(r, g, b, out) {
201
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
202
+ (0, color_spaces_1.xyzd50ToLab)(out[0], out[1], out[2], out);
203
+ return (0, color_spaces_1.labToLch)(out[0], out[1], out[2], out);
204
+ }
205
+ // OKLab / OKLCH
206
+ /** @param l 0..1 @param a raw @param b raw @param alpha alpha byte */
207
+ function oklabToColor(l, a, b, alpha) {
208
+ (0, color_spaces_1.oklabToXyzd65)(l, a, b, SCRATCH);
209
+ (0, color_spaces_1.xyzd65ToD50)(SCRATCH[0], SCRATCH[1], SCRATCH[2], SCRATCH);
210
+ (0, color_spaces_1.xyzd50ToSrgb)(SCRATCH[0], SCRATCH[1], SCRATCH[2], SCRATCH);
211
+ return srgbToColor(SCRATCH[0], SCRATCH[1], SCRATCH[2], alpha);
212
+ }
213
+ /** @param sRGB in [0, 1] @returns out as [l 0..1, a raw, b raw] */
214
+ function srgbToOklab(r, g, b, out) {
215
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
216
+ (0, color_spaces_1.xyzd50ToD65)(out[0], out[1], out[2], out);
217
+ return (0, color_spaces_1.xyzd65ToOklab)(out[0], out[1], out[2], out);
218
+ }
219
+ /** @param l 0..1 @param c raw @param h degrees @param alpha alpha byte */
220
+ function oklchToColor(l, c, h, alpha) {
221
+ (0, color_spaces_1.oklchToXyzd50)(l, c, h, SCRATCH);
222
+ (0, color_spaces_1.xyzd50ToSrgb)(SCRATCH[0], SCRATCH[1], SCRATCH[2], SCRATCH);
223
+ return srgbToColor(SCRATCH[0], SCRATCH[1], SCRATCH[2], alpha);
224
+ }
225
+ /** @param sRGB in [0, 1] @returns out as [l 0..1, c raw, h degrees] */
226
+ function srgbToOklch(r, g, b, out) {
227
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
228
+ return (0, color_spaces_1.xyzd50ToOklch)(out[0], out[1], out[2], out);
229
+ }
230
+ // color() predefined color spaces
231
+ // https://drafts.csswg.org/css-color-4/#predefined
232
+ /** Channel keywords exposed by color(from <origin> <space> …) per color space. */
233
+ function colorSpaceChannels(space) {
234
+ switch (space) {
235
+ case 'srgb':
236
+ case 'srgb-linear':
237
+ case 'display-p3':
238
+ case 'a98-rgb':
239
+ case 'prophoto-rgb':
240
+ case 'rec2020':
241
+ return ['r', 'g', 'b'];
242
+ case 'xyz':
243
+ case 'xyz-d65':
244
+ case 'xyz-d50':
245
+ return ['x', 'y', 'z'];
246
+ default:
247
+ return null;
248
+ }
249
+ }
250
+ /** @param channels in 0..1 @returns out as sRGB in [0, 1], or null for an unknown space */
251
+ function colorSpaceToSrgb(space, c1, c2, c3, out) {
252
+ switch (space) {
253
+ case 'srgb':
254
+ out[0] = c1;
255
+ out[1] = c2;
256
+ out[2] = c3;
257
+ return out;
258
+ case 'srgb-linear':
259
+ (0, color_spaces_1.srgbLinearToXyzd50)(c1, c2, c3, out);
260
+ break;
261
+ case 'display-p3':
262
+ (0, color_spaces_1.displayP3ToXyzd50)(c1, c2, c3, out);
263
+ break;
264
+ case 'a98-rgb':
265
+ (0, color_spaces_1.adobeRGBToXyzd50)(c1, c2, c3, out);
266
+ break;
267
+ case 'prophoto-rgb':
268
+ (0, color_spaces_1.proPhotoToXyzd50)(c1, c2, c3, out);
269
+ break;
270
+ case 'rec2020':
271
+ (0, color_spaces_1.rec2020ToXyzd50)(c1, c2, c3, out);
272
+ break;
273
+ case 'xyz':
274
+ case 'xyz-d65':
275
+ (0, color_spaces_1.xyzd65ToD50)(c1, c2, c3, out);
276
+ break;
277
+ case 'xyz-d50':
278
+ out[0] = c1;
279
+ out[1] = c2;
280
+ out[2] = c3;
281
+ break;
282
+ default: return null;
283
+ }
284
+ return (0, color_spaces_1.xyzd50ToSrgb)(out[0], out[1], out[2], out);
285
+ }
286
+ /** @param channels in 0..1 @returns ColorBits, or null for an unknown space */
287
+ function colorSpaceToColor(space, c1, c2, c3, alpha) {
288
+ if (colorSpaceToSrgb(space, c1, c2, c3, SCRATCH) === null) {
289
+ return null;
290
+ }
291
+ return srgbToColor(SCRATCH[0], SCRATCH[1], SCRATCH[2], alpha);
292
+ }
293
+ /** @param sRGB in [0, 1] @returns out as the space's channels in 0..1, or null for an unknown space */
294
+ function srgbToColorSpace(space, r, g, b, out) {
295
+ switch (space) {
296
+ case 'srgb':
297
+ out[0] = r;
298
+ out[1] = g;
299
+ out[2] = b;
300
+ return out;
301
+ case 'srgb-linear':
302
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
303
+ return (0, color_spaces_1.xyzd50TosRGBLinear)(out[0], out[1], out[2], out);
304
+ case 'display-p3':
305
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
306
+ return (0, color_spaces_1.xyzd50ToDisplayP3)(out[0], out[1], out[2], out);
307
+ case 'a98-rgb':
308
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
309
+ return (0, color_spaces_1.xyzd50ToAdobeRGB)(out[0], out[1], out[2], out);
310
+ case 'prophoto-rgb':
311
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
312
+ return (0, color_spaces_1.xyzd50ToProPhoto)(out[0], out[1], out[2], out);
313
+ case 'rec2020':
314
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
315
+ return (0, color_spaces_1.xyzd50ToRec2020)(out[0], out[1], out[2], out);
316
+ case 'xyz':
317
+ case 'xyz-d65':
318
+ (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
319
+ return (0, color_spaces_1.xyzd50ToD65)(out[0], out[1], out[2], out);
320
+ case 'xyz-d50': return (0, color_spaces_1.srgbToXyzd50)(r, g, b, out);
321
+ default: return null;
322
+ }
323
+ }
324
+ const F = false;
325
+ const T = true;
326
+ const COLOR_MODELS = {
327
+ hsl: { keys: ['h', 's', 'l'], ranges: [360, 100, 100], hues: [T, F, F], fromSrgb: srgbToHsl, toColor: hslToColor },
328
+ hwb: { keys: ['h', 'w', 'b'], ranges: [360, 100, 100], hues: [T, F, F], fromSrgb: srgbToHwb, toColor: hwbToColor },
329
+ lab: { keys: ['l', 'a', 'b'], ranges: [100, 125, 125], hues: [F, F, F], fromSrgb: srgbToLab, toColor: labToColor },
330
+ lch: { keys: ['l', 'c', 'h'], ranges: [100, 150, 360], hues: [F, F, T], fromSrgb: srgbToLch, toColor: lchToColor },
331
+ oklab: { keys: ['l', 'a', 'b'], ranges: [1, 0.4, 0.4], hues: [F, F, F], fromSrgb: srgbToOklab, toColor: oklabToColor },
332
+ oklch: { keys: ['l', 'c', 'h'], ranges: [1, 0.4, 360], hues: [F, F, T], fromSrgb: srgbToOklch, toColor: oklchToColor },
333
+ };
334
+ /** Model for a color-model name (hsl, oklch, …), or null. Own-key lookup so
335
+ * that Object.prototype names ('constructor', '__proto__') are not models. */
336
+ function colorModel(name) {
337
+ return Object.prototype.hasOwnProperty.call(COLOR_MODELS, name) ? COLOR_MODELS[name] : null;
338
+ }
339
+ /** Model for a color() predefined space (channels in 0..1), or null. */
340
+ function colorSpaceModel(space) {
341
+ const keys = colorSpaceChannels(space);
342
+ if (keys === null) {
343
+ return null;
344
+ }
345
+ return {
346
+ keys: keys,
347
+ ranges: [1, 1, 1],
348
+ hues: [F, F, F],
349
+ fromSrgb: (r, g, b, out) => srgbToColorSpace(space, r, g, b, out),
350
+ toColor: (c1, c2, c3, alpha) => colorSpaceToColor(space, c1, c2, c3, alpha),
351
+ };
352
+ }
353
+ //# sourceMappingURL=channels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.js","sourceRoot":"","sources":["../../src/conversion/channels.ts"],"names":[],"mappings":";AAAA,yEAAyE;AACzE,EAAE;AACF,wCAAwC;AACxC,wCAAwC;AACxC,2CAA2C;AAC3C,yDAAyD;AACzD,2CAA2C;AAC3C,yDAAyD;AACzD,8BAA8B;AAC9B,EAAE;AACF,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,4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AM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AAC7F,CAAC;AAED,wEAAwE;AACxE,SAAgB,eAAe,CAAC,KAAa;IAC3C,MAAM,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAA;IACtC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO;QACL,IAAI,EAAE,IAAgC;QACtC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACjB,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,CAAE;QAClE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,CAAE;KAC7E,CAAA;AACH,CAAC"}
@@ -1,23 +1,25 @@
1
- export declare function labToXyzd50(l: number, a: number, b: number): [number, number, number];
2
- export declare function xyzd50ToLab(x: number, y: number, z: number): [number, number, number];
3
- export declare function oklabToXyzd65(l: number, a: number, b: number): [number, number, number];
4
- export declare function xyzd65ToOklab(x: number, y: number, z: number): [number, number, number];
5
- export declare function lchToLab(l: number, c: number, h: number | undefined): [number, number, number];
6
- export declare function labToLch(l: number, a: number, b: number): [number, number, number];
7
- export declare function displayP3ToXyzd50(r: number, g: number, b: number): [number, number, number];
8
- export declare function xyzd50ToDisplayP3(x: number, y: number, z: number): [number, number, number];
9
- export declare function proPhotoToXyzd50(r: number, g: number, b: number): [number, number, number];
10
- export declare function xyzd50ToProPhoto(x: number, y: number, z: number): [number, number, number];
11
- export declare function adobeRGBToXyzd50(r: number, g: number, b: number): [number, number, number];
12
- export declare function xyzd50ToAdobeRGB(x: number, y: number, z: number): [number, number, number];
13
- export declare function rec2020ToXyzd50(r: number, g: number, b: number): [number, number, number];
14
- export declare function xyzd50ToRec2020(x: number, y: number, z: number): [number, number, number];
15
- export declare function xyzd50ToD65(x: number, y: number, z: number): [number, number, number];
16
- export declare function xyzd65ToD50(x: number, y: number, z: number): [number, number, number];
17
- export declare function xyzd65TosRGBLinear(x: number, y: number, z: number): [number, number, number];
18
- export declare function xyzd50TosRGBLinear(x: number, y: number, z: number): [number, number, number];
19
- export declare function srgbLinearToXyzd50(r: number, g: number, b: number): [number, number, number];
20
- export declare function srgbToXyzd50(r: number, g: number, b: number): [number, number, number];
21
- export declare function xyzd50ToSrgb(x: number, y: number, z: number): [number, number, number];
22
- export declare function oklchToXyzd50(lInput: number, c: number, h: number): [number, number, number];
23
- export declare function xyzd50ToOklch(x: number, y: number, z: number): [number, number, number];
1
+ type Vector3 = Float64Array;
2
+ export declare function labToXyzd50(l: number, a: number, b: number, out: Vector3): Vector3;
3
+ export declare function xyzd50ToLab(x: number, y: number, z: number, out: Vector3): Vector3;
4
+ export declare function oklabToXyzd65(l: number, a: number, b: number, out: Vector3): Vector3;
5
+ export declare function xyzd65ToOklab(x: number, y: number, z: number, out: Vector3): Vector3;
6
+ export declare function lchToLab(l: number, c: number, h: number | undefined, out: Vector3): Vector3;
7
+ export declare function labToLch(l: number, a: number, b: number, out: Vector3): Vector3;
8
+ export declare function displayP3ToXyzd50(r: number, g: number, b: number, out: Vector3): Vector3;
9
+ export declare function xyzd50ToDisplayP3(x: number, y: number, z: number, out: Vector3): Vector3;
10
+ export declare function proPhotoToXyzd50(r: number, g: number, b: number, out: Vector3): Vector3;
11
+ export declare function xyzd50ToProPhoto(x: number, y: number, z: number, out: Vector3): Vector3;
12
+ export declare function adobeRGBToXyzd50(r: number, g: number, b: number, out: Vector3): Vector3;
13
+ export declare function xyzd50ToAdobeRGB(x: number, y: number, z: number, out: Vector3): Vector3;
14
+ export declare function rec2020ToXyzd50(r: number, g: number, b: number, out: Vector3): Vector3;
15
+ export declare function xyzd50ToRec2020(x: number, y: number, z: number, out: Vector3): Vector3;
16
+ export declare function xyzd50ToD65(x: number, y: number, z: number, out: Vector3): Vector3;
17
+ export declare function xyzd65ToD50(x: number, y: number, z: number, out: Vector3): Vector3;
18
+ export declare function xyzd65TosRGBLinear(x: number, y: number, z: number, out: Vector3): Vector3;
19
+ export declare function xyzd50TosRGBLinear(x: number, y: number, z: number, out: Vector3): Vector3;
20
+ export declare function srgbLinearToXyzd50(r: number, g: number, b: number, out: Vector3): Vector3;
21
+ export declare function srgbToXyzd50(r: number, g: number, b: number, out: Vector3): Vector3;
22
+ export declare function xyzd50ToSrgb(x: number, y: number, z: number, out: Vector3): Vector3;
23
+ export declare function oklchToXyzd50(l: number, c: number, h: number, out: Vector3): Vector3;
24
+ export declare function xyzd50ToOklch(x: number, y: number, z: number, out: Vector3): Vector3;
25
+ export {};