@zag-js/color-utils 2.0.0-next.2 → 2.0.0-next.4
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.
- package/dist/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/defineProperty.js +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/defineProperty.mjs +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/toPrimitive.js +13 -0
- package/dist/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/toPrimitive.mjs +13 -0
- package/dist/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/toPropertyKey.js +8 -0
- package/dist/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/toPropertyKey.mjs +8 -0
- package/dist/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/typeof.js +15 -0
- package/dist/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/typeof.mjs +10 -0
- package/dist/area-gradient.d.mts +9 -11
- package/dist/area-gradient.d.ts +9 -11
- package/dist/area-gradient.js +58 -89
- package/dist/area-gradient.mjs +54 -77
- package/dist/color-format-gradient.d.mts +76 -78
- package/dist/color-format-gradient.d.ts +76 -78
- package/dist/color-format-gradient.js +118 -185
- package/dist/color-format-gradient.mjs +104 -152
- package/dist/color.d.mts +20 -23
- package/dist/color.d.ts +20 -23
- package/dist/color.js +57 -83
- package/dist/color.mjs +53 -60
- package/dist/gamut.d.mts +2 -5
- package/dist/gamut.d.ts +2 -5
- package/dist/gamut.js +12 -34
- package/dist/gamut.mjs +8 -11
- package/dist/hsb-color.d.mts +37 -40
- package/dist/hsb-color.d.ts +37 -40
- package/dist/hsb-color.js +164 -200
- package/dist/hsb-color.mjs +158 -175
- package/dist/hsl-color.d.mts +33 -36
- package/dist/hsl-color.d.ts +33 -36
- package/dist/hsl-color.js +139 -168
- package/dist/hsl-color.mjs +132 -142
- package/dist/index.d.mts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +23 -60
- package/dist/index.mjs +2 -28
- package/dist/native-color.d.mts +1 -3
- package/dist/native-color.d.ts +1 -3
- package/dist/native-color.js +16 -39
- package/dist/native-color.mjs +12 -16
- package/dist/oklab-color.d.mts +57 -60
- package/dist/oklab-color.d.ts +57 -60
- package/dist/oklab-color.js +363 -379
- package/dist/oklab-color.mjs +353 -350
- package/dist/oklab-math.d.mts +26 -28
- package/dist/oklab-math.d.ts +26 -28
- package/dist/oklab-math.js +123 -142
- package/dist/oklab-math.mjs +108 -108
- package/dist/parse-color.d.mts +3 -6
- package/dist/parse-color.d.ts +3 -6
- package/dist/parse-color.js +22 -48
- package/dist/parse-color.mjs +13 -20
- package/dist/rgb-color.d.mts +33 -36
- package/dist/rgb-color.d.ts +33 -36
- package/dist/rgb-color.js +182 -220
- package/dist/rgb-color.mjs +174 -193
- package/dist/types.d.mts +82 -84
- package/dist/types.d.ts +82 -84
- package/dist/types.js +4 -18
- package/dist/types.mjs +1 -0
- package/package.json +3 -3
- package/dist/chunk-QZ7TP4HQ.mjs +0 -7
package/dist/hsb-color.mjs
CHANGED
|
@@ -1,179 +1,162 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__publicField
|
|
3
|
-
} from "./chunk-QZ7TP4HQ.mjs";
|
|
4
|
-
|
|
5
|
-
// src/hsb-color.ts
|
|
6
|
-
import { clampValue, mod, toFixedNumber } from "@zag-js/utils";
|
|
7
1
|
import { Color } from "./color.mjs";
|
|
8
2
|
import { HSLColor } from "./hsl-color.mjs";
|
|
9
3
|
import { RGBColor } from "./rgb-color.mjs";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
throw new Error("Unknown color channel: " + channel);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
toJSON() {
|
|
166
|
-
return { h: this.hue, s: this.saturation, b: this.brightness, a: this.alpha };
|
|
167
|
-
}
|
|
168
|
-
getFormat() {
|
|
169
|
-
return "hsba";
|
|
170
|
-
}
|
|
171
|
-
getChannels() {
|
|
172
|
-
return _HSBColor.colorChannels;
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
__publicField(_HSBColor, "colorChannels", ["hue", "saturation", "brightness"]);
|
|
176
|
-
var HSBColor = _HSBColor;
|
|
177
|
-
export {
|
|
178
|
-
HSBColor
|
|
4
|
+
import _defineProperty from "./_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/defineProperty.mjs";
|
|
5
|
+
import { clampValue, mod, toFixedNumber } from "@zag-js/utils";
|
|
6
|
+
// src/hsb-color.ts
|
|
7
|
+
const HSB_REGEX = /hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;
|
|
8
|
+
var HSBColor = class HSBColor extends Color {
|
|
9
|
+
constructor(hue, saturation, brightness, alpha) {
|
|
10
|
+
super();
|
|
11
|
+
this.hue = hue;
|
|
12
|
+
this.saturation = saturation;
|
|
13
|
+
this.brightness = brightness;
|
|
14
|
+
this.alpha = alpha;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create HSBColor from float sRGB values (0-1 range, clamped).
|
|
18
|
+
* Higher precision than going through integer RGBColor (0-255).
|
|
19
|
+
*/
|
|
20
|
+
static fromSrgbFloat(r, g, b, alpha) {
|
|
21
|
+
const rc = Math.max(0, Math.min(1, r));
|
|
22
|
+
const gc = Math.max(0, Math.min(1, g));
|
|
23
|
+
const bc = Math.max(0, Math.min(1, b));
|
|
24
|
+
const min = Math.min(rc, gc, bc);
|
|
25
|
+
const brightness = Math.max(rc, gc, bc);
|
|
26
|
+
const chroma = brightness - min;
|
|
27
|
+
const saturation = brightness === 0 ? 0 : chroma / brightness;
|
|
28
|
+
let hue = 0;
|
|
29
|
+
if (chroma !== 0) {
|
|
30
|
+
switch (brightness) {
|
|
31
|
+
case rc:
|
|
32
|
+
hue = (gc - bc) / chroma + (gc < bc ? 6 : 0);
|
|
33
|
+
break;
|
|
34
|
+
case gc:
|
|
35
|
+
hue = (bc - rc) / chroma + 2;
|
|
36
|
+
break;
|
|
37
|
+
case bc: hue = (rc - gc) / chroma + 4;
|
|
38
|
+
}
|
|
39
|
+
hue /= 6;
|
|
40
|
+
}
|
|
41
|
+
return new HSBColor(toFixedNumber(hue * 360, 4), toFixedNumber(saturation * 100, 4), toFixedNumber(brightness * 100, 4), toFixedNumber(alpha, 4));
|
|
42
|
+
}
|
|
43
|
+
static parse(value) {
|
|
44
|
+
let m;
|
|
45
|
+
if (m = value.match(HSB_REGEX)) {
|
|
46
|
+
const [h, s, b, a] = (m[1] ?? m[2]).split(",").map((n) => Number(n.trim().replace("%", "")));
|
|
47
|
+
return new HSBColor(mod(h, 360), clampValue(s, 0, 100), clampValue(b, 0, 100), clampValue(a ?? 1, 0, 1));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
toString(format = "css") {
|
|
51
|
+
switch (format) {
|
|
52
|
+
case "css": return this.toHSL().toString("css");
|
|
53
|
+
case "hex": return this.toRGB().toString("hex");
|
|
54
|
+
case "hexa": return this.toRGB().toString("hexa");
|
|
55
|
+
case "hsb": return `hsb(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%)`;
|
|
56
|
+
case "hsba": return `hsba(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%, ${this.alpha})`;
|
|
57
|
+
case "hsl": return this.toHSL().toString("hsl");
|
|
58
|
+
case "rgb": return this.toRGB().toString("rgb");
|
|
59
|
+
default: return this.toFormat(format).toString(format);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
toFormat(format) {
|
|
63
|
+
switch (format) {
|
|
64
|
+
case "hsba": return this;
|
|
65
|
+
case "hsla": return this.toHSL();
|
|
66
|
+
case "rgba": return this.toRGB();
|
|
67
|
+
case "oklab":
|
|
68
|
+
case "oklch": return this.toRGB().toFormat(format);
|
|
69
|
+
default: throw new Error("Unsupported color conversion: hsb -> " + format);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Converts a HSB color to HSL.
|
|
74
|
+
* Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_HSL.
|
|
75
|
+
* @returns An HSLColor object.
|
|
76
|
+
*/
|
|
77
|
+
toHSL() {
|
|
78
|
+
let saturation = this.saturation / 100;
|
|
79
|
+
let brightness = this.brightness / 100;
|
|
80
|
+
let lightness = brightness * (1 - saturation / 2);
|
|
81
|
+
saturation = lightness === 0 || lightness === 1 ? 0 : (brightness - lightness) / Math.min(lightness, 1 - lightness);
|
|
82
|
+
return new HSLColor(toFixedNumber(this.hue, 2), toFixedNumber(saturation * 100, 2), toFixedNumber(lightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Converts a HSV color value to RGB.
|
|
86
|
+
* Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSV_to_RGB_alternative.
|
|
87
|
+
* @returns An RGBColor object.
|
|
88
|
+
*/
|
|
89
|
+
toRGB() {
|
|
90
|
+
let hue = this.hue;
|
|
91
|
+
let saturation = this.saturation / 100;
|
|
92
|
+
let brightness = this.brightness / 100;
|
|
93
|
+
let fn = (n, k = (n + hue / 60) % 6) => brightness - saturation * brightness * Math.max(Math.min(k, 4 - k, 1), 0);
|
|
94
|
+
return new RGBColor(Math.round(fn(5) * 255), Math.round(fn(3) * 255), Math.round(fn(1) * 255), toFixedNumber(this.alpha, 2));
|
|
95
|
+
}
|
|
96
|
+
clone() {
|
|
97
|
+
return new HSBColor(this.hue, this.saturation, this.brightness, this.alpha);
|
|
98
|
+
}
|
|
99
|
+
getChannelFormatOptions(channel) {
|
|
100
|
+
switch (channel) {
|
|
101
|
+
case "hue": return {
|
|
102
|
+
style: "unit",
|
|
103
|
+
unit: "degree",
|
|
104
|
+
unitDisplay: "narrow"
|
|
105
|
+
};
|
|
106
|
+
case "saturation":
|
|
107
|
+
case "brightness":
|
|
108
|
+
case "alpha": return { style: "percent" };
|
|
109
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
formatChannelValue(channel, locale) {
|
|
113
|
+
let options = this.getChannelFormatOptions(channel);
|
|
114
|
+
let value = this.getChannelValue(channel);
|
|
115
|
+
if (channel === "saturation" || channel === "brightness") value /= 100;
|
|
116
|
+
return new Intl.NumberFormat(locale, options).format(value);
|
|
117
|
+
}
|
|
118
|
+
getChannelRange(channel) {
|
|
119
|
+
switch (channel) {
|
|
120
|
+
case "hue": return {
|
|
121
|
+
minValue: 0,
|
|
122
|
+
maxValue: 360,
|
|
123
|
+
step: 1,
|
|
124
|
+
pageSize: 15
|
|
125
|
+
};
|
|
126
|
+
case "saturation":
|
|
127
|
+
case "brightness": return {
|
|
128
|
+
minValue: 0,
|
|
129
|
+
maxValue: 100,
|
|
130
|
+
step: 1,
|
|
131
|
+
pageSize: 10
|
|
132
|
+
};
|
|
133
|
+
case "alpha": return {
|
|
134
|
+
minValue: 0,
|
|
135
|
+
maxValue: 1,
|
|
136
|
+
step: .01,
|
|
137
|
+
pageSize: .1
|
|
138
|
+
};
|
|
139
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
toJSON() {
|
|
143
|
+
return {
|
|
144
|
+
h: this.hue,
|
|
145
|
+
s: this.saturation,
|
|
146
|
+
b: this.brightness,
|
|
147
|
+
a: this.alpha
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
getFormat() {
|
|
151
|
+
return "hsba";
|
|
152
|
+
}
|
|
153
|
+
getChannels() {
|
|
154
|
+
return HSBColor.colorChannels;
|
|
155
|
+
}
|
|
179
156
|
};
|
|
157
|
+
_defineProperty(HSBColor, "colorChannels", [
|
|
158
|
+
"hue",
|
|
159
|
+
"saturation",
|
|
160
|
+
"brightness"
|
|
161
|
+
]);
|
|
162
|
+
export { HSBColor };
|
package/dist/hsl-color.d.mts
CHANGED
|
@@ -1,36 +1,33 @@
|
|
|
1
|
-
import { Color } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { HSLColor, HSL_REGEX };
|
|
1
|
+
import { Color } from "./color.mjs";
|
|
2
|
+
import { ColorChannel, ColorChannelRange, ColorFormat, ColorStringFormat, ColorType } from "./types.mjs";
|
|
3
|
+
export declare const HSL_REGEX: RegExp;
|
|
4
|
+
export declare class HSLColor extends Color {
|
|
5
|
+
private hue;
|
|
6
|
+
private saturation;
|
|
7
|
+
private lightness;
|
|
8
|
+
private alpha;
|
|
9
|
+
constructor(hue: number, saturation: number, lightness: number, alpha: number);
|
|
10
|
+
static parse(value: string): HSLColor | void;
|
|
11
|
+
toString(format?: ColorStringFormat): string;
|
|
12
|
+
toFormat(format: ColorFormat): ColorType;
|
|
13
|
+
/**
|
|
14
|
+
* Converts a HSL color to HSB.
|
|
15
|
+
* Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_HSV.
|
|
16
|
+
* @returns An HSBColor object.
|
|
17
|
+
*/
|
|
18
|
+
private toHSB;
|
|
19
|
+
/**
|
|
20
|
+
* Converts a HSL color to RGB.
|
|
21
|
+
* Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB_alternative.
|
|
22
|
+
* @returns An RGBColor object.
|
|
23
|
+
*/
|
|
24
|
+
private toRGB;
|
|
25
|
+
clone(): ColorType;
|
|
26
|
+
getChannelFormatOptions(channel: ColorChannel): Intl.NumberFormatOptions;
|
|
27
|
+
formatChannelValue(channel: ColorChannel, locale: string): string;
|
|
28
|
+
getChannelRange(channel: ColorChannel): ColorChannelRange;
|
|
29
|
+
toJSON(): Record<"h" | "s" | "l" | "a", number>;
|
|
30
|
+
getFormat(): ColorFormat;
|
|
31
|
+
private static colorChannels;
|
|
32
|
+
getChannels(): [ColorChannel, ColorChannel, ColorChannel];
|
|
33
|
+
}
|
package/dist/hsl-color.d.ts
CHANGED
|
@@ -1,36 +1,33 @@
|
|
|
1
|
-
import { Color } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { HSLColor, HSL_REGEX };
|
|
1
|
+
import { Color } from "./color.js";
|
|
2
|
+
import { ColorChannel, ColorChannelRange, ColorFormat, ColorStringFormat, ColorType } from "./types.js";
|
|
3
|
+
export declare const HSL_REGEX: RegExp;
|
|
4
|
+
export declare class HSLColor extends Color {
|
|
5
|
+
private hue;
|
|
6
|
+
private saturation;
|
|
7
|
+
private lightness;
|
|
8
|
+
private alpha;
|
|
9
|
+
constructor(hue: number, saturation: number, lightness: number, alpha: number);
|
|
10
|
+
static parse(value: string): HSLColor | void;
|
|
11
|
+
toString(format?: ColorStringFormat): string;
|
|
12
|
+
toFormat(format: ColorFormat): ColorType;
|
|
13
|
+
/**
|
|
14
|
+
* Converts a HSL color to HSB.
|
|
15
|
+
* Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_HSV.
|
|
16
|
+
* @returns An HSBColor object.
|
|
17
|
+
*/
|
|
18
|
+
private toHSB;
|
|
19
|
+
/**
|
|
20
|
+
* Converts a HSL color to RGB.
|
|
21
|
+
* Conversion formula adapted from https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB_alternative.
|
|
22
|
+
* @returns An RGBColor object.
|
|
23
|
+
*/
|
|
24
|
+
private toRGB;
|
|
25
|
+
clone(): ColorType;
|
|
26
|
+
getChannelFormatOptions(channel: ColorChannel): Intl.NumberFormatOptions;
|
|
27
|
+
formatChannelValue(channel: ColorChannel, locale: string): string;
|
|
28
|
+
getChannelRange(channel: ColorChannel): ColorChannelRange;
|
|
29
|
+
toJSON(): Record<"h" | "s" | "l" | "a", number>;
|
|
30
|
+
getFormat(): ColorFormat;
|
|
31
|
+
private static colorChannels;
|
|
32
|
+
getChannels(): [ColorChannel, ColorChannel, ColorChannel];
|
|
33
|
+
}
|