@newtonedev/colors 0.0.1

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 (88) hide show
  1. package/README.md +167 -0
  2. package/dist/__tests__/contrast.test.d.ts +2 -0
  3. package/dist/__tests__/contrast.test.d.ts.map +1 -0
  4. package/dist/__tests__/conversions.test.d.ts +2 -0
  5. package/dist/__tests__/conversions.test.d.ts.map +1 -0
  6. package/dist/__tests__/difference.test.d.ts +2 -0
  7. package/dist/__tests__/difference.test.d.ts.map +1 -0
  8. package/dist/__tests__/dynamic-range.test.d.ts +2 -0
  9. package/dist/__tests__/dynamic-range.test.d.ts.map +1 -0
  10. package/dist/__tests__/gamut.test.d.ts +2 -0
  11. package/dist/__tests__/gamut.test.d.ts.map +1 -0
  12. package/dist/__tests__/hue-grade.test.d.ts +2 -0
  13. package/dist/__tests__/hue-grade.test.d.ts.map +1 -0
  14. package/dist/__tests__/integration.test.d.ts +2 -0
  15. package/dist/__tests__/integration.test.d.ts.map +1 -0
  16. package/dist/__tests__/interpolation.test.d.ts +2 -0
  17. package/dist/__tests__/interpolation.test.d.ts.map +1 -0
  18. package/dist/__tests__/resolve-color.test.d.ts +2 -0
  19. package/dist/__tests__/resolve-color.test.d.ts.map +1 -0
  20. package/dist/__tests__/scale.test.d.ts +2 -0
  21. package/dist/__tests__/scale.test.d.ts.map +1 -0
  22. package/dist/color/difference.d.ts +6 -0
  23. package/dist/color/difference.d.ts.map +1 -0
  24. package/dist/color/interpolation.d.ts +10 -0
  25. package/dist/color/interpolation.d.ts.map +1 -0
  26. package/dist/config.d.ts +38 -0
  27. package/dist/config.d.ts.map +1 -0
  28. package/dist/constants.d.ts +39 -0
  29. package/dist/constants.d.ts.map +1 -0
  30. package/dist/contrast/apca.d.ts +14 -0
  31. package/dist/contrast/apca.d.ts.map +1 -0
  32. package/dist/contrast/index.d.ts +3 -0
  33. package/dist/contrast/index.d.ts.map +1 -0
  34. package/dist/contrast/wcag.d.ts +14 -0
  35. package/dist/contrast/wcag.d.ts.map +1 -0
  36. package/dist/conversions/hex.d.ts +6 -0
  37. package/dist/conversions/hex.d.ts.map +1 -0
  38. package/dist/conversions/index.d.ts +7 -0
  39. package/dist/conversions/index.d.ts.map +1 -0
  40. package/dist/conversions/linear-p3.d.ts +6 -0
  41. package/dist/conversions/linear-p3.d.ts.map +1 -0
  42. package/dist/conversions/linear-srgb.d.ts +6 -0
  43. package/dist/conversions/linear-srgb.d.ts.map +1 -0
  44. package/dist/conversions/oklab.d.ts +6 -0
  45. package/dist/conversions/oklab.d.ts.map +1 -0
  46. package/dist/conversions/pipeline.d.ts +18 -0
  47. package/dist/conversions/pipeline.d.ts.map +1 -0
  48. package/dist/conversions/srgb.d.ts +10 -0
  49. package/dist/conversions/srgb.d.ts.map +1 -0
  50. package/dist/difference.d.ts +6 -0
  51. package/dist/difference.d.ts.map +1 -0
  52. package/dist/dynamic-range.d.ts +19 -0
  53. package/dist/dynamic-range.d.ts.map +1 -0
  54. package/dist/gamut/check.d.ts +6 -0
  55. package/dist/gamut/check.d.ts.map +1 -0
  56. package/dist/gamut/index.d.ts +4 -0
  57. package/dist/gamut/index.d.ts.map +1 -0
  58. package/dist/gamut/map.d.ts +8 -0
  59. package/dist/gamut/map.d.ts.map +1 -0
  60. package/dist/gamut/max-chroma.d.ts +8 -0
  61. package/dist/gamut/max-chroma.d.ts.map +1 -0
  62. package/dist/hue-grade.d.ts +66 -0
  63. package/dist/hue-grade.d.ts.map +1 -0
  64. package/dist/index.cjs +602 -0
  65. package/dist/index.cjs.map +1 -0
  66. package/dist/index.d.ts +25 -0
  67. package/dist/index.d.ts.map +1 -0
  68. package/dist/index.js +553 -0
  69. package/dist/index.js.map +1 -0
  70. package/dist/interpolation.d.ts +10 -0
  71. package/dist/interpolation.d.ts.map +1 -0
  72. package/dist/resolve-color.d.ts +55 -0
  73. package/dist/resolve-color.d.ts.map +1 -0
  74. package/dist/scale/dynamic-range.d.ts +23 -0
  75. package/dist/scale/dynamic-range.d.ts.map +1 -0
  76. package/dist/scale/generate.d.ts +55 -0
  77. package/dist/scale/generate.d.ts.map +1 -0
  78. package/dist/scale/hue-grade.d.ts +67 -0
  79. package/dist/scale/hue-grade.d.ts.map +1 -0
  80. package/dist/scale/key-color.d.ts +53 -0
  81. package/dist/scale/key-color.d.ts.map +1 -0
  82. package/dist/scale/resolve-color.d.ts +55 -0
  83. package/dist/scale/resolve-color.d.ts.map +1 -0
  84. package/dist/scale.d.ts +61 -0
  85. package/dist/scale.d.ts.map +1 -0
  86. package/dist/types.d.ts +29 -0
  87. package/dist/types.d.ts.map +1 -0
  88. package/package.json +36 -0
package/README.md ADDED
@@ -0,0 +1,167 @@
1
+ # newtone-colors
2
+
3
+ Pure TypeScript OKLCH color toolkit. Zero dependencies.
4
+
5
+ Produces accessible, perceptually uniform color scales from declarative parameters. Every output is guaranteed in-gamut — no fallbacks, no clamping after the fact.
6
+
7
+ ---
8
+
9
+ ## Core concepts
10
+
11
+ All colors are in **OKLCH** — a perceptually uniform cylindrical space:
12
+
13
+ | Channel | Range | Meaning |
14
+ |---|---|---|
15
+ | `L` | 0–1 | Lightness (0 = black, 1 = white) |
16
+ | `C` | 0–~0.37 | Chroma (0 = achromatic) |
17
+ | `h` | 0–360° | Hue angle |
18
+
19
+ ---
20
+
21
+ ## Scale generation
22
+
23
+ The primary output is `generateScale` — a discretized OKLCH curve from lightest to darkest, with chroma at each step proportional to the gamut boundary:
24
+
25
+ ```ts
26
+ import { generateScale, oklchToHex } from "newtone-colors";
27
+
28
+ const scale = generateScale({ hue: 264, steps: 11 });
29
+ const hexValues = scale.map(oklchToHex);
30
+ ```
31
+
32
+ ### ScaleOptions
33
+
34
+ | Option | Type | Default | Description |
35
+ |---|---|---|---|
36
+ | `hue` | `number` | — | Hue angle in degrees (0–360) |
37
+ | `steps` | `number` | — | Number of steps (minimum 2) |
38
+ | `chroma.value` | `number` | `1` | How much of the gamut to use (0–1). 0 = achromatic, 1 = maximum. |
39
+ | `chroma.offset` | `number` | `0.5` | Where in the scale chroma peaks (0 = lightest end, 1 = darkest end). |
40
+ | `gamut` | `"srgb" \| "display-p3"` | `"srgb"` | Target gamut for chroma boundary. |
41
+ | `lightest` | `number` | `1` | Lightness of the lightest step. |
42
+ | `darkest` | `number` | `0` | Lightness of the darkest step. |
43
+ | `grading` | `Grading` | — | Global hue grading shared across all palettes. |
44
+ | `gradient` | `Gradient` | — | Per-palette one-sided hue grade. |
45
+
46
+ ---
47
+
48
+ ## Key color workflow
49
+
50
+ Derive scale parameters from a brand color, then locate it in the generated scale:
51
+
52
+ ```ts
53
+ import { keyColor, generateScale, findNearest, oklchToHex } from "newtone-colors";
54
+
55
+ const key = keyColor("#3B82F6", { gamut: "srgb", lightest: 0.96, darkest: 0.16 });
56
+ const scale = generateScale({ ...key, steps: 11 });
57
+ const { index } = findNearest(key.resolved.oklch, scale);
58
+
59
+ // scale[index] is the step closest to the original color
60
+ console.log(oklchToHex(scale[index]));
61
+ ```
62
+
63
+ `keyColor` derives `hue` and `chroma` (value + offset) from the color and returns them ready to spread into `ScaleOptions`. The `chroma.offset` is computed from where the color's lightness falls within the scale range, so the chroma peak aligns with the key color's position.
64
+
65
+ The reverse direction — step to hex — is already covered by `oklchToHex(scale[index])`.
66
+
67
+ ---
68
+
69
+ ## Hue grading
70
+
71
+ Shift hues at the light or dark end of the scale toward a target hue, using vector interpolation in OKLAB (no shortest-arc discontinuity at 180°):
72
+
73
+ ```ts
74
+ import { generateScale } from "newtone-colors";
75
+ import type { Grading, Gradient } from "newtone-colors";
76
+
77
+ // Global: affects all palettes equally
78
+ const grading: Grading = {
79
+ lightHue: 145, lightValue: 0.15, // light end shifts toward 145°
80
+ darkHue: 25, darkValue: 0.15, // dark end shifts toward 25°
81
+ };
82
+
83
+ // Per-palette: one-sided, stronger
84
+ const gradient: Gradient = {
85
+ hue: 200,
86
+ value: 0.3,
87
+ direction: "dark", // only affects the dark end
88
+ };
89
+
90
+ const scale = generateScale({ hue: 264, steps: 11, grading, gradient });
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Dynamic range
96
+
97
+ Map slider values (0–1) to lightness bounds. The defaults keep the scale away from blinding white and unusable black:
98
+
99
+ ```ts
100
+ import { resolveLightest, resolveDarkest } from "newtone-colors";
101
+
102
+ const lightest = resolveLightest(0); // → 0.96 (MIN_LIGHTEST_L)
103
+ const darkest = resolveDarkest(0); // → 0.16 (MAX_DARKEST_L)
104
+
105
+ const scale = generateScale({ hue: 264, steps: 11, lightest, darkest });
106
+ ```
107
+
108
+ See [docs/constants.md](docs/constants.md) for all hardcoded values and their rationale.
109
+
110
+ ---
111
+
112
+ ## Gamut utilities
113
+
114
+ ```ts
115
+ import { isInGamut, gamutMap, maxChroma, oklchToSrgb } from "newtone-colors";
116
+
117
+ const rgb = oklchToSrgb({ L: 0.7, C: 0.2, h: 264 });
118
+ isInGamut(rgb); // true/false
119
+ gamutMap({ L: 0.7, C: 0.3, h: 264 }, "srgb"); // → in-gamut Oklch
120
+ maxChroma(0.6, 264, "srgb"); // → max C at this L/h
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Contrast
126
+
127
+ ```ts
128
+ import { wcagContrast, apcaContrast, contrastTextHex } from "newtone-colors";
129
+ import type { Srgb } from "newtone-colors";
130
+
131
+ const bg: Srgb = { r: 0.1, g: 0.1, b: 0.5 };
132
+ const fg: Srgb = { r: 1, g: 1, b: 1 };
133
+
134
+ wcagContrast(bg, fg); // WCAG 2.x contrast ratio
135
+ apcaContrast(bg, fg); // APCA-W3 Lc value
136
+ contrastTextHex(bg); // "#000000" or "#ffffff", whichever has better contrast
137
+ ```
138
+
139
+ ---
140
+
141
+ ## Color resolution
142
+
143
+ Resolve any hex or OKLCH input to scale-ready parameters, with automatic gamut mapping if needed:
144
+
145
+ ```ts
146
+ import { resolveColor } from "newtone-colors";
147
+
148
+ const result = resolveColor("#E74C3C", "srgb");
149
+ result.hue; // extracted hue
150
+ result.chromaRatio; // chroma as fraction of gamut boundary → ScaleOptions.chroma.value
151
+ result.wasRemapped; // true if the color was outside the target gamut
152
+ result.original; // original OKLCH before mapping
153
+ ```
154
+
155
+ ---
156
+
157
+ ## Color math
158
+
159
+ ```ts
160
+ import { deltaEOK, mix } from "newtone-colors";
161
+
162
+ // Perceptual distance (Euclidean in OKLAB)
163
+ deltaEOK(colorA, colorB);
164
+
165
+ // Interpolate between two OKLCH colors (shortest-arc hue)
166
+ mix(colorA, colorB, 0.5);
167
+ ```
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=contrast.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contrast.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/contrast.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=conversions.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversions.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/conversions.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=difference.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"difference.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/difference.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dynamic-range.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-range.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/dynamic-range.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=gamut.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gamut.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/gamut.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hue-grade.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hue-grade.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/hue-grade.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/integration.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interpolation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolation.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/interpolation.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resolve-color.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-color.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/resolve-color.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scale.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scale.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/scale.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { Oklab, Oklch } from "../types.js";
2
+ /** Compute deltaEOK (Euclidean distance in OKLAB) between two OKLCH colors. */
3
+ export declare function deltaEOK(a: Oklch, b: Oklch): number;
4
+ /** Compute deltaEOK directly from OKLAB values. */
5
+ export declare function deltaEOKLab(a: Oklab, b: Oklab): number;
6
+ //# sourceMappingURL=difference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"difference.d.ts","sourceRoot":"","sources":["../../src/color/difference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGhD,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAEnD;AAED,mDAAmD;AACnD,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAKtD"}
@@ -0,0 +1,10 @@
1
+ import type { Oklch } from "../types.js";
2
+ /**
3
+ * Linearly interpolate between two OKLCH colors.
4
+ *
5
+ * L and C are linearly interpolated. Hue uses shortest-arc interpolation.
6
+ * Achromatic colors (C near zero) inherit the other color's hue to avoid
7
+ * meaningless hue sweeps through the achromatic pole.
8
+ */
9
+ export declare function mix(a: Oklch, b: Oklch, t: number): Oklch;
10
+ //# sourceMappingURL=interpolation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interpolation.d.ts","sourceRoot":"","sources":["../../src/color/interpolation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGzC;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAyBxD"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Design constants — the values you tune by hand.
3
+ *
4
+ * Edit this file to adjust the perceptual behavior of every scale and
5
+ * grading operation across the library.
6
+ */
7
+ /**
8
+ * Lightest step's lightness when the whites slider is at 0.
9
+ * slider 0 → L = MIN_LIGHTEST_L, slider 1 → L = 1.0 (pure white).
10
+ */
11
+ export declare const MIN_LIGHTEST_L = 0.96;
12
+ /**
13
+ * Darkest step's lightness when the darks slider is at 0.
14
+ * slider 0 → L = MAX_DARKEST_L, slider 1 → L = 0.0 (pure black).
15
+ */
16
+ export declare const MAX_DARKEST_L = 0.16;
17
+ /**
18
+ * How far a global grade reaches into the scale from each end (0–1).
19
+ * Light grading fades to zero at t = GRADE_REACH.
20
+ * Dark grading fades to zero at t = 1 − GRADE_REACH.
21
+ */
22
+ export declare const GRADE_REACH: number;
23
+ /** Maximum blend intensity for global grading. Inputs above this are clamped. */
24
+ export declare const MAX_GRADE_INTENSITY = 0.25;
25
+ /**
26
+ * How far a local (per-palette) grade reaches into the scale from each end (0–1).
27
+ * Slightly wider than GRADE_REACH to give per-palette grading more room.
28
+ */
29
+ export declare const LOCAL_GRADE_REACH: number;
30
+ /** Maximum blend intensity for local grading. Inputs above this are clamped. */
31
+ export declare const MAX_LOCAL_GRADE_INTENSITY = 0.5;
32
+ /**
33
+ * Just-noticeable difference threshold (deltaEOK).
34
+ * Colors with distance below this are considered perceptually identical.
35
+ * Used to classify color matches as exact vs. fallback.
36
+ */
37
+ export declare const PERCEPTUAL_JND = 0.02;
38
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,aAAa,OAAO,CAAC;AAIlC;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAQ,CAAC;AAEjC,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AAEvC,gFAAgF;AAChF,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAI7C;;;;GAIG;AACH,eAAO,MAAM,cAAc,OAAO,CAAC"}
@@ -0,0 +1,39 @@
1
+ export declare const SRGB_GAMMA_THRESHOLD = 0.04045;
2
+ export declare const SRGB_GAMMA_THRESHOLD_LINEAR = 0.0031308;
3
+ export declare const SRGB_GAMMA_SLOPE = 12.92;
4
+ export declare const SRGB_GAMMA_EXPONENT = 2.4;
5
+ export declare const SRGB_GAMMA_OFFSET = 0.055;
6
+ export declare const SRGB_GAMMA_SCALE = 1.055;
7
+ export declare const LINEAR_SRGB_TO_LMS: readonly [readonly [0.4122214708, 0.5363325363, 0.0514459929], readonly [0.2119034982, 0.6806995451, 0.1073969566], readonly [0.0883024619, 0.2817188376, 0.6299787005]];
8
+ export declare const LMS_PRIME_TO_OKLAB: readonly [readonly [0.2104542553, 0.793617785, -0.0040720468], readonly [1.9779984951, -2.428592205, 0.4505937099], readonly [0.0259040371, 0.7827717662, -0.808675766]];
9
+ export declare const OKLAB_TO_LMS_PRIME: readonly [readonly [1, 0.3963377774, 0.2158037573], readonly [1, -0.1055613458, -0.0638541728], readonly [1, -0.0894841775, -1.291485548]];
10
+ export declare const LMS_TO_LINEAR_SRGB: readonly [readonly [4.0767416621, -3.3077115913, 0.2309699292], readonly [-1.2684380046, 2.6097574011, -0.3413193965], readonly [-0.0041960863, -0.7034186147, 1.707614701]];
11
+ export declare const LINEAR_P3_TO_LMS: readonly [readonly [0.4813791595, 0.4621155872, 0.0565406381], readonly [0.2288319169, 0.6532167007, 0.1179528072], readonly [0.0839457149, 0.2241651052, 0.6918912614]];
12
+ export declare const LMS_TO_LINEAR_P3: readonly [readonly [3.127769439, -2.2570600176, 0.1291828502], readonly [-1.0910091977, 2.4133065499, -0.3222615148], readonly [-0.0260108068, -0.5080402362, 1.5340494942]];
13
+ export declare const GAMUT_EPSILON = 0.000001;
14
+ export declare const GAMUT_MAP_JND = 0.02;
15
+ export declare const GAMUT_MAP_EPSILON = 0.0001;
16
+ export declare const GAMUT_MAP_MAX_ITERATIONS = 50;
17
+ export declare const ACHROMATIC_THRESHOLD = 1e-10;
18
+ export declare const WCAG_R = 0.2126;
19
+ export declare const WCAG_G = 0.7152;
20
+ export declare const WCAG_B = 0.0722;
21
+ export declare const APCA_MAIN_TRC = 2.4;
22
+ export declare const APCA_SRGB_R = 0.2126729;
23
+ export declare const APCA_SRGB_G = 0.7151522;
24
+ export declare const APCA_SRGB_B = 0.072175;
25
+ export declare const APCA_NORM_BG = 0.56;
26
+ export declare const APCA_NORM_TXT = 0.57;
27
+ export declare const APCA_REV_TXT = 0.62;
28
+ export declare const APCA_REV_BG = 0.65;
29
+ export declare const APCA_BLK_THRS = 0.022;
30
+ export declare const APCA_BLK_CLMP = 1.414;
31
+ export declare const APCA_SCALE_BOW = 1.14;
32
+ export declare const APCA_SCALE_WOB = 1.14;
33
+ export declare const APCA_LO_BOW_OFFSET = 0.027;
34
+ export declare const APCA_LO_WOB_OFFSET = 0.027;
35
+ export declare const APCA_DELTA_Y_MIN = 0.0005;
36
+ export declare const APCA_LO_CLIP = 0.1;
37
+ export declare const DEG_TO_RAD: number;
38
+ export declare const RAD_TO_DEG: number;
39
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAC5C,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AACtC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,iBAAiB,QAAQ,CAAC;AACvC,eAAO,MAAM,gBAAgB,QAAQ,CAAC;AAItC,eAAO,MAAM,kBAAkB,0KAIrB,CAAC;AAIX,eAAO,MAAM,kBAAkB,0KAIrB,CAAC;AAIX,eAAO,MAAM,kBAAkB,4IAIrB,CAAC;AAIX,eAAO,MAAM,kBAAkB,8KAIrB,CAAC;AAKX,eAAO,MAAM,gBAAgB,0KAInB,CAAC;AAIX,eAAO,MAAM,gBAAgB,8KAInB,CAAC;AAIX,eAAO,MAAM,aAAa,WAAO,CAAC;AAClC,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,iBAAiB,SAAO,CAAC;AACtC,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAI3C,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAI1C,eAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,eAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,eAAO,MAAM,MAAM,SAAS,CAAC;AAI7B,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,WAAW,WAAY,CAAC;AACrC,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,YAAY,OAAO,CAAC;AACjC,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,eAAO,MAAM,gBAAgB,SAAS,CAAC;AACvC,eAAO,MAAM,YAAY,MAAM,CAAC;AAIhC,eAAO,MAAM,UAAU,QAAgB,CAAC;AACxC,eAAO,MAAM,UAAU,QAAgB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Srgb } from "../types.js";
2
+ /**
3
+ * Compute APCA-W3 Lc (Lightness Contrast) between text and background.
4
+ *
5
+ * Returns a signed value in roughly [-108, +106]:
6
+ * Positive = dark text on light background (BoW)
7
+ * Negative = light text on dark background (WoB)
8
+ * 0 = no meaningful contrast
9
+ *
10
+ * IMPORTANT: Uses its own linearization (simple 2.4 gamma),
11
+ * NOT the IEC piecewise sRGB transfer function.
12
+ */
13
+ export declare function apcaContrast(textColor: Srgb, bgColor: Srgb): number;
14
+ //# sourceMappingURL=apca.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apca.d.ts","sourceRoot":"","sources":["../../src/contrast/apca.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAoBxC;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,MAAM,CAmCnE"}
@@ -0,0 +1,3 @@
1
+ export { wcagLuminance, wcagContrast } from "./wcag.js";
2
+ export { apcaContrast } from "./apca.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contrast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Srgb } from "../types.js";
2
+ /** Compute WCAG 2.x relative luminance [0, 1] from an sRGB color. */
3
+ export declare function wcagLuminance(color: Srgb): number;
4
+ /**
5
+ * Compute WCAG 2.x contrast ratio between two sRGB colors.
6
+ * Returns a value in [1, 21]. Symmetric (order doesn't matter).
7
+ */
8
+ export declare function wcagContrast(a: Srgb, b: Srgb): number;
9
+ /**
10
+ * Choose black or white text for maximum WCAG contrast against a background.
11
+ * @returns `"#000000"` or `"#ffffff"`.
12
+ */
13
+ export declare function contrastTextHex(background: Srgb): "#000000" | "#ffffff";
14
+ //# sourceMappingURL=wcag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wcag.d.ts","sourceRoot":"","sources":["../../src/contrast/wcag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAIxC,qEAAqE;AACrE,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAMjD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,MAAM,CAMrD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,IAAI,GAAG,SAAS,GAAG,SAAS,CAMvE"}
@@ -0,0 +1,6 @@
1
+ import type { Hex, Srgb } from "../types.js";
2
+ /** Parse a hex color string (#RGB, #RRGGBB, or bare) to sRGB [0,1]. */
3
+ export declare function hexToSrgb(hex: string): Srgb;
4
+ /** Convert sRGB [0,1] to lowercase hex string (#rrggbb). Clamps to [0,1]. */
5
+ export declare function srgbToHex(color: Srgb): Hex;
6
+ //# sourceMappingURL=hex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hex.d.ts","sourceRoot":"","sources":["../../src/conversions/hex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE7C,uEAAuE;AACvE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAa3C;AAED,6EAA6E;AAC7E,wBAAgB,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,GAAG,CAK1C"}
@@ -0,0 +1,7 @@
1
+ export { oklabToOklch, oklchToOklab } from "./oklab.js";
2
+ export { linearSrgbToOklab, oklabToLinearSrgb } from "./linear-srgb.js";
3
+ export { srgbToLinearSrgb, linearSrgbToSrgb, srgbChannelToLinear, linearChannelToSrgb, } from "./srgb.js";
4
+ export { hexToSrgb, srgbToHex } from "./hex.js";
5
+ export { srgbToOklch, oklchToSrgb, srgbToOklab, oklabToSrgb, hexToOklch, oklchToHex, p3ToOklch, oklchToP3, } from "./pipeline.js";
6
+ export { linearP3ToOklab, oklabToLinearP3 } from "./linear-p3.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conversions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { LinearSrgb, Oklab } from "../types.js";
2
+ /** Convert Linear Display P3 to OKLAB via P3-specific M1 + shared M2. */
3
+ export declare function linearP3ToOklab(color: LinearSrgb): Oklab;
4
+ /** Convert OKLAB to Linear Display P3 via shared inverse M2 + P3-specific inverse M1. */
5
+ export declare function oklabToLinearP3(color: Oklab): LinearSrgb;
6
+ //# sourceMappingURL=linear-p3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear-p3.d.ts","sourceRoot":"","sources":["../../src/conversions/linear-p3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAQrD,yEAAyE;AACzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAmCxD;AAED,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAmCxD"}
@@ -0,0 +1,6 @@
1
+ import type { LinearSrgb, Oklab } from "../types.js";
2
+ /** Convert Linear sRGB to OKLAB via Ottosson's direct M1/M2 matrices. */
3
+ export declare function linearSrgbToOklab(color: LinearSrgb): Oklab;
4
+ /** Convert OKLAB to Linear sRGB via inverse M2/M1 matrices. */
5
+ export declare function oklabToLinearSrgb(color: Oklab): LinearSrgb;
6
+ //# sourceMappingURL=linear-srgb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear-srgb.d.ts","sourceRoot":"","sources":["../../src/conversions/linear-srgb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAQrD,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,CAmC1D;AAED,+DAA+D;AAC/D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,CAmC1D"}
@@ -0,0 +1,6 @@
1
+ import type { Oklab, Oklch } from "../types.js";
2
+ /** Convert OKLAB (cartesian) to OKLCH (cylindrical). Achromatic colors get h=0. */
3
+ export declare function oklabToOklch(lab: Oklab): Oklch;
4
+ /** Convert OKLCH (cylindrical) to OKLAB (cartesian). */
5
+ export declare function oklchToOklab(lch: Oklch): Oklab;
6
+ //# sourceMappingURL=oklab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oklab.d.ts","sourceRoot":"","sources":["../../src/conversions/oklab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGhD,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,GAAG,EAAE,KAAK,GAAG,KAAK,CAW9C;AAED,wDAAwD;AACxD,wBAAgB,YAAY,CAAC,GAAG,EAAE,KAAK,GAAG,KAAK,CAO9C"}
@@ -0,0 +1,18 @@
1
+ import type { Hex, Oklab, Oklch, Srgb } from "../types.js";
2
+ /** Convert sRGB to OKLCH. */
3
+ export declare function srgbToOklch(color: Srgb): Oklch;
4
+ /** Convert OKLCH to sRGB. May produce out-of-gamut values (channels outside [0,1]). */
5
+ export declare function oklchToSrgb(color: Oklch): Srgb;
6
+ /** Convert sRGB to OKLAB. */
7
+ export declare function srgbToOklab(color: Srgb): Oklab;
8
+ /** Convert OKLAB to sRGB. May produce out-of-gamut values. */
9
+ export declare function oklabToSrgb(color: Oklab): Srgb;
10
+ /** Convert hex to OKLCH. */
11
+ export declare function hexToOklch(hex: string): Oklch;
12
+ /** Convert OKLCH to hex. Clamps to sRGB gamut before hex encoding. */
13
+ export declare function oklchToHex(color: Oklch): Hex;
14
+ /** Convert Display P3 to OKLCH. */
15
+ export declare function p3ToOklch(color: Srgb): Oklch;
16
+ /** Convert OKLCH to Display P3. May produce out-of-gamut values (channels outside [0,1]). */
17
+ export declare function oklchToP3(color: Oklch): Srgb;
18
+ //# sourceMappingURL=pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/conversions/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAO3D,6BAA6B;AAC7B,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,KAAK,CAE9C;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAE9C;AAED,6BAA6B;AAC7B,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,GAAG,KAAK,CAE9C;AAED,8DAA8D;AAC9D,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAE9C;AAED,4BAA4B;AAC5B,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAE7C;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,GAAG,CAO5C;AAED,mCAAmC;AACnC,wBAAgB,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,KAAK,CAE5C;AAED,6FAA6F;AAC7F,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAE5C"}
@@ -0,0 +1,10 @@
1
+ import type { LinearSrgb, Srgb } from "../types.js";
2
+ /** Decode a single sRGB gamma-encoded channel to linear light. */
3
+ export declare function srgbChannelToLinear(value: number): number;
4
+ /** Encode a single linear light channel to sRGB gamma. */
5
+ export declare function linearChannelToSrgb(value: number): number;
6
+ /** Convert an sRGB color to Linear sRGB. */
7
+ export declare function srgbToLinearSrgb(color: Srgb): LinearSrgb;
8
+ /** Convert a Linear sRGB color to sRGB. */
9
+ export declare function linearSrgbToSrgb(color: LinearSrgb): Srgb;
10
+ //# sourceMappingURL=srgb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"srgb.d.ts","sourceRoot":"","sources":["../../src/conversions/srgb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAUpD,kEAAkE;AAClE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,0DAA0D;AAC1D,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,4CAA4C;AAC5C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,IAAI,GAAG,UAAU,CAMxD;AAED,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAMxD"}
@@ -0,0 +1,6 @@
1
+ import type { Oklab, Oklch } from "./types.js";
2
+ /** Compute deltaEOK (Euclidean distance in OKLAB) between two OKLCH colors. */
3
+ export declare function deltaEOK(a: Oklch, b: Oklch): number;
4
+ /** Compute deltaEOK directly from OKLAB values. */
5
+ export declare function deltaEOKLab(a: Oklab, b: Oklab): number;
6
+ //# sourceMappingURL=difference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"difference.d.ts","sourceRoot":"","sources":["../src/difference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAG/C,+EAA+E;AAC/E,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAEnD;AAED,mDAAmD;AACnD,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM,CAKtD"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Dynamic range resolution — maps slider values (0–1) to OKLCH lightness
3
+ * bounds for the lightest and darkest steps of a color scale.
4
+ */
5
+ /** Minimum lightness for the lightest step when slider is at 0. */
6
+ export declare const MIN_LIGHTEST_L = 0.96;
7
+ /** Maximum lightness for the darkest step when slider is at 0. */
8
+ export declare const MAX_DARKEST_L = 0.16;
9
+ /**
10
+ * Resolve a whites slider value (0–1) to an OKLCH lightness.
11
+ * slider 0 → L = MIN_LIGHTEST_L (0.96), slider 1 → L = 1.0 (pure white)
12
+ */
13
+ export declare function resolveLightest(slider: number): number;
14
+ /**
15
+ * Resolve a darks slider value (0–1) to an OKLCH lightness.
16
+ * slider 0 → L = MAX_DARKEST_L (0.16), slider 1 → L = 0.0 (pure black)
17
+ */
18
+ export declare function resolveDarkest(slider: number): number;
19
+ //# sourceMappingURL=dynamic-range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-range.d.ts","sourceRoot":"","sources":["../src/dynamic-range.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mEAAmE;AACnE,eAAO,MAAM,cAAc,OAAO,CAAC;AAEnC,kEAAkE;AAClE,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGrD"}
@@ -0,0 +1,6 @@
1
+ import type { Srgb } from "../types.js";
2
+ /** Check if sRGB channels are within [0, 1] (with epsilon tolerance). */
3
+ export declare function isInGamut(color: Srgb): boolean;
4
+ /** Clamp sRGB channels to [0, 1]. */
5
+ export declare function clampSrgb(color: Srgb): Srgb;
6
+ //# sourceMappingURL=check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/gamut/check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGxC,yEAAyE;AACzE,wBAAgB,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAS9C;AAED,qCAAqC;AACrC,wBAAgB,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,CAM3C"}
@@ -0,0 +1,4 @@
1
+ export { isInGamut, clampSrgb } from "./check.js";
2
+ export { gamutMap } from "./map.js";
3
+ export { maxChroma } from "./max-chroma.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gamut/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Gamut, Oklch } from "../types.js";
2
+ /**
3
+ * Map an OKLCH color into the target gamut using the CSS Color Level 4 algorithm.
4
+ * Reduces chroma at fixed L and h via binary search with deltaEOK JND check.
5
+ * @param gamut Target gamut (default: 'srgb').
6
+ */
7
+ export declare function gamutMap(color: Oklch, gamut?: Gamut): Oklch;
8
+ //# sourceMappingURL=map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/gamut/map.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAQ,MAAM,aAAa,CAAC;AAetD;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,GAAE,KAAc,GAAG,KAAK,CA6CnE"}
@@ -0,0 +1,8 @@
1
+ import type { Gamut } from "../types.js";
2
+ /**
3
+ * Find the maximum gamut chroma for a given OKLCH lightness and hue.
4
+ * Binary search on chroma [0, upperBound].
5
+ * @param gamut Target gamut (default: 'srgb'). P3 searches up to 0.5.
6
+ */
7
+ export declare function maxChroma(L: number, h: number, gamut?: Gamut): number;
8
+ //# sourceMappingURL=max-chroma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"max-chroma.d.ts","sourceRoot":"","sources":["../../src/gamut/max-chroma.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,aAAa,CAAC;AAKhD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,GAAE,KAAc,GAAG,MAAM,CAsB7E"}