@ac-kit/format-css-color 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2024-2026 Anthony Champagne and contributors
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # @ac-kit/format-css-color
2
+
3
+ Parse, serialise and evaluate the CSS `<color>` production.
4
+
5
+ Every notation CSS Color 4 defines — hex, the `rgb()`/`hsl()`/`hwb()` family,
6
+ `lab()`/`lch()`/`oklab()`/`oklch()`, `color()` over six colour spaces,
7
+ `color-mix()`, relative colour syntax, the 148 colour keywords, `transparent`
8
+ and `currentColor`.
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ npm install @ac-kit/format-css-color
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ Parsing keeps what was written; evaluating is a separate step, because a linter
19
+ and a renderer want different answers.
20
+
21
+ ```ts
22
+ import {
23
+ parseCssColor,
24
+ printCssColor,
25
+ resolveCssColor,
26
+ toHex,
27
+ } from "@ac-kit/format-css-color";
28
+
29
+ const color = parseCssColor("oklch(70% 0.15 250deg)");
30
+
31
+ printCssColor(color); // "oklch(70% 0.15 250deg)" — round-trips the source
32
+ toHex(resolveCssColor(color)); // "#4f8fd4"
33
+ ```
34
+
35
+ `tryParseCssColor` returns `null` instead of throwing, for validating input
36
+ where a failed parse is an expected outcome rather than an error.
37
+
38
+ ```ts
39
+ import { tryParseCssColor } from "@ac-kit/format-css-color";
40
+
41
+ tryParseCssColor("#bad-input"); // null
42
+ ```
43
+
44
+ Relative colour syntax reads channels of an origin colour, in the units the
45
+ surrounding notation uses:
46
+
47
+ ```ts
48
+ toHex(resolveCssColor(parseCssColor("rgb(from #ff8000 0 g b)"))); // "#008000"
49
+ ```
50
+
51
+ `currentColor` has no value outside a cascade, so resolving it needs a
52
+ substitute:
53
+
54
+ ```ts
55
+ resolveCssColor(parseCssColor("currentColor"), {
56
+ currentColor: { r: 1, g: 0, b: 0, alpha: 1 },
57
+ });
58
+ ```
59
+
60
+ ## Display names
61
+
62
+ A keyword is an identifier, not something to show a reader — `mediumvioletred`
63
+ is a token. Labels live under a per-locale subpath, so importing one language
64
+ never pulls in the rest:
65
+
66
+ ```ts
67
+ import { cssColorLabel } from "@ac-kit/format-css-color";
68
+ import { CSS_COLOR_LABELS } from "@ac-kit/format-css-color/names/fr";
69
+
70
+ cssColorLabel(CSS_COLOR_LABELS, "aliceblue"); // "Bleu Alice"
71
+ cssColorLabel(CSS_COLOR_LABELS, "aqua"); // "Cyan" — aliases are followed
72
+ cssColorLabel(CSS_COLOR_LABELS, "unknown"); // "unknown" — never empty
73
+ ```
74
+
75
+ Every locale module exports the same two names, `LOCALE` and `CSS_COLOR_LABELS`,
76
+ so a dynamic import works without knowing the language up front:
77
+
78
+ ```ts
79
+ const { CSS_COLOR_LABELS } = await import(
80
+ `@ac-kit/format-css-color/names/${locale}`
81
+ );
82
+ ```
83
+
84
+ French is the only language shipped so far. No canonical multilingual dataset of
85
+ colour names exists, so each one is a translation rather than an import.
86
+
87
+ ## Notes
88
+
89
+ - Colour values are `@ac-kit/math-color` types; this package owns the syntax,
90
+ not the colour science.
91
+ - `calc()` inside a component is not accepted. It is a CSS value-level grammar
92
+ rather than part of `<color>`, and belongs to a package that owns arithmetic
93
+ over any property.
94
+ - `color-mix()` interpolates in OKLab whatever space the keyword names. That
95
+ agrees closely for the rectangular spaces and differs for the polar ones by
96
+ taking the shortest hue arc.
97
+ - Resolving clamps into sRGB rather than gamut-mapping. Map with
98
+ `@ac-kit/math-color` first when that matters.
99
+
100
+ See the
101
+ [generated API docs](https://anthochamp.github.io/node-essentials/api/format-css-color/)
102
+ for the full reference.
@@ -0,0 +1,19 @@
1
+ import { cssNamedColorName, type CssColorName } from "./named-colors.js";
2
+ /**
3
+ * Display labels for the CSS colour keywords, in one language.
4
+ *
5
+ * A keyword is an identifier, not a label: `mediumvioletred` is a token, not
6
+ * something to show a reader. Tables of labels are shipped per locale under
7
+ * `@ac-kit/format-css-color/names/<locale>`, so importing one language never
8
+ * pulls in the rest.
9
+ */
10
+ export type CssColorLabels = ReadonlyMap<CssColorName, string>;
11
+ /**
12
+ * How `name` is presented to a reader, following aliases the same way
13
+ * `cssNamedColor` does.
14
+ *
15
+ * @returns The keyword itself when `labels` has no entry for it, so a partial
16
+ * translation degrades to the identifier rather than to nothing.
17
+ */
18
+ export declare function cssColorLabel(labels: CssColorLabels, name: Parameters<typeof cssNamedColorName>[0]): string;
19
+ //# sourceMappingURL=color-labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-labels.d.ts","sourceRoot":"","sources":["../src/color-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEzE;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAC3C,MAAM,CAOR"}
@@ -0,0 +1,16 @@
1
+ import { cssNamedColorName } from "./named-colors.js";
2
+ /**
3
+ * How `name` is presented to a reader, following aliases the same way
4
+ * `cssNamedColor` does.
5
+ *
6
+ * @returns The keyword itself when `labels` has no entry for it, so a partial
7
+ * translation degrades to the identifier rather than to nothing.
8
+ */
9
+ export function cssColorLabel(labels, name) {
10
+ const canonical = cssNamedColorName(name);
11
+ if (!canonical) {
12
+ return name;
13
+ }
14
+ return labels.get(canonical) ?? name;
15
+ }
16
+ //# sourceMappingURL=color-labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color-labels.js","sourceRoot":"","sources":["../src/color-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAqB,MAAM,mBAAmB,CAAC;AAYzE;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC5B,MAAsB,EACtB,IAA6C;IAE7C,MAAM,SAAS,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,CAAC,SAAS,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;AACtC,CAAC"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * The CSS `<color>` production as a syntax tree.
3
+ *
4
+ * Parsing keeps what was written rather than collapsing to one representation:
5
+ * `oklch(70% 0.1 200)` and its sRGB approximation are different authored
6
+ * values, `color-mix()` has operands that must survive to be mixed, and
7
+ * relative colour syntax refers to channels of a colour it has not seen yet.
8
+ * Evaluating happens in a separate step — see `resolveCssColor`.
9
+ */
10
+ import type { CssColorName } from "./named-colors.js";
11
+ /**
12
+ * One channel value as authored.
13
+ *
14
+ * `none` is a real CSS value, not an absence: it means "this channel carries no
15
+ * information", which interpolation treats differently from zero.
16
+ *
17
+ * `calc()` is deliberately absent — it is a CSS value-level grammar, not part
18
+ * of `<color>`, and belongs to a package that owns arithmetic over any
19
+ * property.
20
+ */
21
+ export type CssComponent = {
22
+ readonly kind: "number";
23
+ readonly value: number;
24
+ } | {
25
+ readonly kind: "percentage";
26
+ readonly value: number;
27
+ }
28
+ /** Radians. The unit a source used is not kept; a hue is a hue. */
29
+ | {
30
+ readonly kind: "angle";
31
+ readonly radians: number;
32
+ } | {
33
+ readonly kind: "none";
34
+ }
35
+ /** A channel of the origin colour in relative colour syntax. */
36
+ | {
37
+ readonly kind: "channel";
38
+ readonly name: string;
39
+ };
40
+ /** Colour spaces `color()` can name, plus the polar and rectangular models. */
41
+ export type CssColorSpace = "srgb" | "srgb-linear" | "display-p3" | "a98-rgb" | "prophoto-rgb" | "rec2020" | "xyz" | "xyz-d50" | "xyz-d65";
42
+ /** Which space `color-mix()` interpolates in. */
43
+ export type CssMixSpace = CssColorSpace | "hsl" | "hwb" | "lab" | "lch" | "oklab" | "oklch";
44
+ /**
45
+ * Functional notations that take three components plus an optional alpha.
46
+ *
47
+ * `rgba()` and `hsla()` are not members: they are the legacy spelling of the
48
+ * same function, recorded by `legacy` and restored when printing.
49
+ */
50
+ export type CssColorFunction = "rgb" | "hsl" | "hwb" | "lab" | "lch" | "oklab" | "oklch";
51
+ export type CssAngleUnit = "deg" | "grad" | "rad" | "turn";
52
+ export type CssColor =
53
+ /** `transparent`, which is `rgb(0 0 0 / 0)` with its own spelling. */
54
+ {
55
+ readonly kind: "transparent";
56
+ }
57
+ /** `currentColor`, resolvable only against an inherited value. */
58
+ | {
59
+ readonly kind: "currentColor";
60
+ } | {
61
+ readonly kind: "named";
62
+ readonly name: CssColorName;
63
+ }
64
+ /**
65
+ * `#rgb`, `#rgba`, `#rrggbb`, `#rrggbbaa`. `digits` is kept so printing can
66
+ * round-trip the authored form.
67
+ */
68
+ | {
69
+ readonly kind: "hex";
70
+ readonly r8: number;
71
+ readonly g8: number;
72
+ readonly b8: number;
73
+ readonly a8: number;
74
+ readonly digits: 3 | 4 | 6 | 8;
75
+ } | {
76
+ readonly kind: "function";
77
+ readonly name: CssColorFunction;
78
+ readonly components: readonly [CssComponent, CssComponent, CssComponent];
79
+ readonly alpha: CssComponent | null;
80
+ /** The `from` colour of relative colour syntax. */
81
+ readonly origin: CssColor | null;
82
+ /** Whether the source used the legacy comma form, for printing. */
83
+ readonly legacy: boolean;
84
+ } | {
85
+ readonly kind: "color";
86
+ readonly space: CssColorSpace;
87
+ readonly components: readonly [CssComponent, CssComponent, CssComponent];
88
+ readonly alpha: CssComponent | null;
89
+ readonly origin: CssColor | null;
90
+ } | {
91
+ readonly kind: "mix";
92
+ readonly space: CssMixSpace;
93
+ readonly first: CssColor;
94
+ /** Percentage in `[0, 100]`, or `null` for the implied half. */
95
+ readonly firstWeight: number | null;
96
+ readonly second: CssColor;
97
+ readonly secondWeight: number | null;
98
+ };
99
+ //# sourceMappingURL=css-color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-color.d.ts","sourceRoot":"","sources":["../src/css-color.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;;;;;GASG;AACH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E,QAAQ,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The CSS `<color>` production as a syntax tree.
3
+ *
4
+ * Parsing keeps what was written rather than collapsing to one representation:
5
+ * `oklch(70% 0.1 200)` and its sRGB approximation are different authored
6
+ * values, `color-mix()` has operands that must survive to be mixed, and
7
+ * relative colour syntax refers to channels of a colour it has not seen yet.
8
+ * Evaluating happens in a separate step — see `resolveCssColor`.
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=css-color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css-color.js","sourceRoot":"","sources":["../src/css-color.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,11 @@
1
+ /** Input that is not a `<color>`, with the offset the parse gave up at. */
2
+ export declare class CssColorSyntaxError extends SyntaxError {
3
+ readonly source: string;
4
+ readonly offset: number;
5
+ constructor(source: string, offset: number, detail: string);
6
+ }
7
+ /** A colour that cannot be evaluated without context the caller did not give. */
8
+ export declare class UnresolvedColorError extends Error {
9
+ constructor(detail: string);
10
+ }
11
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,qBAAa,mBAAoB,SAAQ,WAAW;IAElD,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM;IAFxB,YACU,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EAId;CACD;AAED,iFAAiF;AACjF,qBAAa,oBAAqB,SAAQ,KAAK;IAC9C,YAAY,MAAM,EAAE,MAAM,EAGzB;CACD"}
package/dist/errors.js ADDED
@@ -0,0 +1,19 @@
1
+ /** Input that is not a `<color>`, with the offset the parse gave up at. */
2
+ export class CssColorSyntaxError extends SyntaxError {
3
+ source;
4
+ offset;
5
+ constructor(source, offset, detail) {
6
+ super(`${detail} at offset ${offset} in ${JSON.stringify(source)}`);
7
+ this.source = source;
8
+ this.offset = offset;
9
+ this.name = "CssColorSyntaxError";
10
+ }
11
+ }
12
+ /** A colour that cannot be evaluated without context the caller did not give. */
13
+ export class UnresolvedColorError extends Error {
14
+ constructor(detail) {
15
+ super(detail);
16
+ this.name = "UnresolvedColorError";
17
+ }
18
+ }
19
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAEzC,MAAM;IACN,MAAM;IAFhB,YACU,MAAc,EACd,MAAc,EACvB,MAAc;QAEd,KAAK,CAAC,GAAG,MAAM,cAAc,MAAM,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;sBAJ3D,MAAM;sBACN,MAAM;QAIf,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACnC,CAAC;CACD;AAED,iFAAiF;AACjF,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAC9C,YAAY,MAAc;QACzB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACpC,CAAC;CACD"}
@@ -0,0 +1,8 @@
1
+ export * from "./color-labels.js";
2
+ export * from "./css-color.js";
3
+ export * from "./errors.js";
4
+ export * from "./named-colors.js";
5
+ export * from "./parse-css-color.js";
6
+ export * from "./print-css-color.js";
7
+ export * from "./resolve-css-color.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ export * from "./color-labels.js";
2
+ export * from "./css-color.js";
3
+ export * from "./errors.js";
4
+ export * from "./named-colors.js";
5
+ export * from "./parse-css-color.js";
6
+ export * from "./print-css-color.js";
7
+ export * from "./resolve-css-color.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { Rgb8 } from "@ac-kit/math-color";
2
+ export type CssColorName = "aliceblue" | "antiquewhite" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen";
3
+ export type CssColorAliasName = "aqua" | "fuchsia" | "grey" | "darkgrey" | "lightgray" | "dimgrey" | "darkslategrey" | "slategrey" | "lightslategrey";
4
+ export declare const CSS_COLOR_ALIASES: Readonly<Record<CssColorAliasName, CssColorName>>;
5
+ export type CssNamedColor = {
6
+ name: CssColorName;
7
+ color: Rgb8;
8
+ };
9
+ export declare const CSS_NAMED_COLORS: Map<CssColorName, Rgb8>;
10
+ /** Every spelling the spec defines, aliases excluded. */
11
+ export declare function cssNamedColorNames(): Set<string>;
12
+ /**
13
+ * The value a CSS colour keyword names, following aliases.
14
+ *
15
+ * @returns `null` for a keyword the spec does not define.
16
+ */
17
+ export declare function cssNamedColor(name: string): Rgb8 | null;
18
+ /**
19
+ * Given a CSS colour keyword, return the canonical spelling of it, following
20
+ * aliases.
21
+ *
22
+ * Returns `null` for a keyword the spec does not define.
23
+ */
24
+ export declare function cssNamedColorName(name: string): CssColorName | null;
25
+ //# sourceMappingURL=named-colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named-colors.d.ts","sourceRoot":"","sources":["../src/named-colors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,MAAM,YAAY,GACrB,WAAW,GACX,cAAc,GACd,YAAY,GACZ,OAAO,GACP,OAAO,GACP,QAAQ,GACR,OAAO,GACP,gBAAgB,GAChB,MAAM,GACN,YAAY,GACZ,OAAO,GACP,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,OAAO,GACP,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,MAAM,GACN,UAAU,GACV,UAAU,GACV,eAAe,GACf,UAAU,GACV,WAAW,GACX,WAAW,GACX,aAAa,GACb,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,cAAc,GACd,eAAe,GACf,eAAe,GACf,eAAe,GACf,YAAY,GACZ,UAAU,GACV,aAAa,GACb,SAAS,GACT,YAAY,GACZ,WAAW,GACX,aAAa,GACb,aAAa,GACb,WAAW,GACX,YAAY,GACZ,MAAM,GACN,WAAW,GACX,MAAM,GACN,OAAO,GACP,aAAa,GACb,UAAU,GACV,SAAS,GACT,WAAW,GACX,QAAQ,GACR,OAAO,GACP,OAAO,GACP,UAAU,GACV,eAAe,GACf,WAAW,GACX,cAAc,GACd,WAAW,GACX,YAAY,GACZ,WAAW,GACX,sBAAsB,GACtB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,GACd,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,GACb,MAAM,GACN,WAAW,GACX,OAAO,GACP,SAAS,GACT,QAAQ,GACR,kBAAkB,GAClB,YAAY,GACZ,cAAc,GACd,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,cAAc,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_COLOR_ALIASES = {
2
+ aqua: "cyan",
3
+ fuchsia: "magenta",
4
+ grey: "gray",
5
+ darkgrey: "darkgray",
6
+ lightgray: "lightgrey",
7
+ dimgrey: "dimgray",
8
+ darkslategrey: "darkslategray",
9
+ slategrey: "slategray",
10
+ lightslategrey: "lightslategray",
11
+ };
12
+ export const CSS_NAMED_COLORS = new Map([
13
+ ["aliceblue", { r8: 0xf0, g8: 0xf8, b8: 0xff }],
14
+ ["antiquewhite", { r8: 0xfa, g8: 0xeb, b8: 0xd7 }],
15
+ ["aquamarine", { r8: 0x7f, g8: 0xff, b8: 0xd4 }],
16
+ ["azure", { r8: 0xf0, g8: 0xff, b8: 0xff }],
17
+ ["beige", { r8: 0xf5, g8: 0xf5, b8: 0xdc }],
18
+ ["bisque", { r8: 0xff, g8: 0xe4, b8: 0xc4 }],
19
+ ["black", { r8: 0x00, g8: 0x00, b8: 0x00 }],
20
+ ["blanchedalmond", { r8: 0xff, g8: 0xeb, b8: 0xcd }],
21
+ ["blue", { r8: 0x00, g8: 0x00, b8: 0xff }],
22
+ ["blueviolet", { r8: 0x8a, g8: 0x2b, b8: 0xe2 }],
23
+ ["brown", { r8: 0xa5, g8: 0x2a, b8: 0x2a }],
24
+ ["burlywood", { r8: 0xde, g8: 0xb8, b8: 0x87 }],
25
+ ["cadetblue", { r8: 0x5f, g8: 0x9e, b8: 0xa0 }],
26
+ ["chartreuse", { r8: 0x7f, g8: 0xff, b8: 0x00 }],
27
+ ["chocolate", { r8: 0xd2, g8: 0x69, b8: 0x1e }],
28
+ ["coral", { r8: 0xff, g8: 0x7f, b8: 0x50 }],
29
+ ["cornflowerblue", { r8: 0x64, g8: 0x95, b8: 0xed }],
30
+ ["cornsilk", { r8: 0xff, g8: 0xf8, b8: 0xdc }],
31
+ ["crimson", { r8: 0xdc, g8: 0x14, b8: 0x3c }],
32
+ ["cyan", { r8: 0x00, g8: 0xff, b8: 0xff }],
33
+ ["darkblue", { r8: 0x00, g8: 0x00, b8: 0x8b }],
34
+ ["darkcyan", { r8: 0x00, g8: 0x8b, b8: 0x8b }],
35
+ ["darkgoldenrod", { r8: 0xb8, g8: 0x86, b8: 0x0b }],
36
+ ["darkgray", { r8: 0xa9, g8: 0xa9, b8: 0xa9 }],
37
+ ["darkgreen", { r8: 0x00, g8: 0x64, b8: 0x00 }],
38
+ ["darkkhaki", { r8: 0xbd, g8: 0xb7, b8: 0x6b }],
39
+ ["darkmagenta", { r8: 0x8b, g8: 0x00, b8: 0x8b }],
40
+ ["darkolivegreen", { r8: 0x55, g8: 0x6b, b8: 0x2f }],
41
+ ["darkorange", { r8: 0xff, g8: 0x8c, b8: 0x00 }],
42
+ ["darkorchid", { r8: 0x99, g8: 0x32, b8: 0xcc }],
43
+ ["darkred", { r8: 0x8b, g8: 0x00, b8: 0x00 }],
44
+ ["darksalmon", { r8: 0xe9, g8: 0x96, b8: 0x7a }],
45
+ ["darkseagreen", { r8: 0x8f, g8: 0xbc, b8: 0x8f }],
46
+ ["darkslateblue", { r8: 0x48, g8: 0x3d, b8: 0x8b }],
47
+ ["darkslategray", { r8: 0x2f, g8: 0x4f, b8: 0x4f }],
48
+ ["darkturquoise", { r8: 0x00, g8: 0xce, b8: 0xd1 }],
49
+ ["darkviolet", { r8: 0x94, g8: 0x00, b8: 0xd3 }],
50
+ ["deeppink", { r8: 0xff, g8: 0x14, b8: 0x93 }],
51
+ ["deepskyblue", { r8: 0x00, g8: 0xbf, b8: 0xff }],
52
+ ["dimgray", { r8: 0x69, g8: 0x69, b8: 0x69 }],
53
+ ["dodgerblue", { r8: 0x1e, g8: 0x90, b8: 0xff }],
54
+ ["firebrick", { r8: 0xb2, g8: 0x22, b8: 0x22 }],
55
+ ["floralwhite", { r8: 0xff, g8: 0xfa, b8: 0xf0 }],
56
+ ["forestgreen", { r8: 0x22, g8: 0x8b, b8: 0x22 }],
57
+ ["gainsboro", { r8: 0xdc, g8: 0xdc, b8: 0xdc }],
58
+ ["ghostwhite", { r8: 0xf8, g8: 0xf8, b8: 0xff }],
59
+ ["gold", { r8: 0xff, g8: 0xd7, b8: 0x00 }],
60
+ ["goldenrod", { r8: 0xda, g8: 0xa5, b8: 0x20 }],
61
+ ["gray", { r8: 0x80, g8: 0x80, b8: 0x80 }],
62
+ ["green", { r8: 0x00, g8: 0x80, b8: 0x00 }],
63
+ ["greenyellow", { r8: 0xad, g8: 0xff, b8: 0x2f }],
64
+ ["honeydew", { r8: 0xf0, g8: 0xff, b8: 0xf0 }],
65
+ ["hotpink", { r8: 0xff, g8: 0x69, b8: 0xb4 }],
66
+ ["indianred", { r8: 0xcd, g8: 0x5c, b8: 0x5c }],
67
+ ["indigo", { r8: 0x4b, g8: 0x00, b8: 0x82 }],
68
+ ["ivory", { r8: 0xff, g8: 0xff, b8: 0xf0 }],
69
+ ["khaki", { r8: 0xf0, g8: 0xe6, b8: 0x8c }],
70
+ ["lavender", { r8: 0xe6, g8: 0xe6, b8: 0xfa }],
71
+ ["lavenderblush", { r8: 0xff, g8: 0xf0, b8: 0xf5 }],
72
+ ["lawngreen", { r8: 0x7c, g8: 0xfc, b8: 0x00 }],
73
+ ["lemonchiffon", { r8: 0xff, g8: 0xfa, b8: 0xcd }],
74
+ ["lightblue", { r8: 0xad, g8: 0xd8, b8: 0xe6 }],
75
+ ["lightcoral", { r8: 0xf0, g8: 0x80, b8: 0x80 }],
76
+ ["lightcyan", { r8: 0xe0, g8: 0xff, b8: 0xff }],
77
+ ["lightgoldenrodyellow", { r8: 0xfa, g8: 0xfa, b8: 0xd2 }],
78
+ ["lightgreen", { r8: 0x90, g8: 0xee, b8: 0x90 }],
79
+ ["lightgrey", { r8: 0xd3, g8: 0xd3, b8: 0xd3 }],
80
+ ["lightpink", { r8: 0xff, g8: 0xb6, b8: 0xc1 }],
81
+ ["lightsalmon", { r8: 0xff, g8: 0xa0, b8: 0x7a }],
82
+ ["lightseagreen", { r8: 0x20, g8: 0xb2, b8: 0xaa }],
83
+ ["lightskyblue", { r8: 0x87, g8: 0xce, b8: 0xfa }],
84
+ ["lightslategray", { r8: 0x77, g8: 0x88, b8: 0x99 }],
85
+ ["lightsteelblue", { r8: 0xb0, g8: 0xc4, b8: 0xde }],
86
+ ["lightyellow", { r8: 0xff, g8: 0xff, b8: 0xe0 }],
87
+ ["lime", { r8: 0x00, g8: 0xff, b8: 0x00 }],
88
+ ["limegreen", { r8: 0x32, g8: 0xcd, b8: 0x32 }],
89
+ ["linen", { r8: 0xfa, g8: 0xf0, b8: 0xe6 }],
90
+ ["magenta", { r8: 0xff, g8: 0x00, b8: 0xff }],
91
+ ["maroon", { r8: 0x80, g8: 0x00, b8: 0x00 }],
92
+ ["mediumaquamarine", { r8: 0x66, g8: 0xcd, b8: 0xaa }],
93
+ ["mediumblue", { r8: 0x00, g8: 0x00, b8: 0xcd }],
94
+ ["mediumorchid", { r8: 0xba, g8: 0x55, b8: 0xd3 }],
95
+ ["mediumpurple", { r8: 0x93, g8: 0x70, b8: 0xdb }],
96
+ ["mediumseagreen", { r8: 0x3c, g8: 0xb3, b8: 0x71 }],
97
+ ["mediumslateblue", { r8: 0x7b, g8: 0x68, b8: 0xee }],
98
+ ["mediumspringgreen", { r8: 0x00, g8: 0xfa, b8: 0x9a }],
99
+ ["mediumturquoise", { r8: 0x48, g8: 0xd1, b8: 0xcc }],
100
+ ["mediumvioletred", { r8: 0xc7, g8: 0x15, b8: 0x85 }],
101
+ ["midnightblue", { r8: 0x19, g8: 0x19, b8: 0x70 }],
102
+ ["mintcream", { r8: 0xf5, g8: 0xff, b8: 0xfa }],
103
+ ["mistyrose", { r8: 0xff, g8: 0xe4, b8: 0xe1 }],
104
+ ["moccasin", { r8: 0xff, g8: 0xe4, b8: 0xb5 }],
105
+ ["navajowhite", { r8: 0xff, g8: 0xde, b8: 0xad }],
106
+ ["navy", { r8: 0x00, g8: 0x00, b8: 0x80 }],
107
+ ["oldlace", { r8: 0xfd, g8: 0xf5, b8: 0xe6 }],
108
+ ["olive", { r8: 0x80, g8: 0x80, b8: 0x00 }],
109
+ ["olivedrab", { r8: 0x6b, g8: 0x8e, b8: 0x23 }],
110
+ ["orange", { r8: 0xff, g8: 0xa5, b8: 0x00 }],
111
+ ["orangered", { r8: 0xff, g8: 0x45, b8: 0x00 }],
112
+ ["orchid", { r8: 0xda, g8: 0x70, b8: 0xd6 }],
113
+ ["palegoldenrod", { r8: 0xee, g8: 0xe8, b8: 0xaa }],
114
+ ["palegreen", { r8: 0x98, g8: 0xfb, b8: 0x98 }],
115
+ ["paleturquoise", { r8: 0xaf, g8: 0xee, b8: 0xee }],
116
+ ["palevioletred", { r8: 0xdb, g8: 0x70, b8: 0x93 }],
117
+ ["papayawhip", { r8: 0xff, g8: 0xef, b8: 0xd5 }],
118
+ ["peachpuff", { r8: 0xff, g8: 0xda, b8: 0xb9 }],
119
+ ["peru", { r8: 0xcd, g8: 0x85, b8: 0x3f }],
120
+ ["pink", { r8: 0xff, g8: 0xc0, b8: 0xcb }],
121
+ ["plum", { r8: 0xdd, g8: 0xa0, b8: 0xdd }],
122
+ ["powderblue", { r8: 0xb0, g8: 0xe0, b8: 0xe6 }],
123
+ ["purple", { r8: 0x80, g8: 0x00, b8: 0x80 }],
124
+ ["rebeccapurple", { r8: 0x66, g8: 0x33, b8: 0x99 }],
125
+ ["red", { r8: 0xff, g8: 0x00, b8: 0x00 }],
126
+ ["rosybrown", { r8: 0xbc, g8: 0x8f, b8: 0x8f }],
127
+ ["royalblue", { r8: 0x41, g8: 0x69, b8: 0xe1 }],
128
+ ["saddlebrown", { r8: 0x8b, g8: 0x45, b8: 0x13 }],
129
+ ["salmon", { r8: 0xfa, g8: 0x80, b8: 0x72 }],
130
+ ["sandybrown", { r8: 0xf4, g8: 0xa4, b8: 0x60 }],
131
+ ["seagreen", { r8: 0x2e, g8: 0x8b, b8: 0x57 }],
132
+ ["seashell", { r8: 0xff, g8: 0xf5, b8: 0xee }],
133
+ ["sienna", { r8: 0xa0, g8: 0x52, b8: 0x2d }],
134
+ ["silver", { r8: 0xc0, g8: 0xc0, b8: 0xc0 }],
135
+ ["skyblue", { r8: 0x87, g8: 0xce, b8: 0xeb }],
136
+ ["slateblue", { r8: 0x6a, g8: 0x5a, b8: 0xcd }],
137
+ ["slategray", { r8: 0x70, g8: 0x80, b8: 0x90 }],
138
+ ["snow", { r8: 0xff, g8: 0xfa, b8: 0xfa }],
139
+ ["springgreen", { r8: 0x00, g8: 0xff, b8: 0x7f }],
140
+ ["steelblue", { r8: 0x46, g8: 0x82, b8: 0xb4 }],
141
+ ["tan", { r8: 0xd2, g8: 0xb4, b8: 0x8c }],
142
+ ["teal", { r8: 0x00, g8: 0x80, b8: 0x80 }],
143
+ ["thistle", { r8: 0xd8, g8: 0xbf, b8: 0xd8 }],
144
+ ["tomato", { r8: 0xff, g8: 0x63, b8: 0x47 }],
145
+ ["turquoise", { r8: 0x40, g8: 0xe0, b8: 0xd0 }],
146
+ ["violet", { r8: 0xee, g8: 0x82, b8: 0xee }],
147
+ ["wheat", { r8: 0xf5, g8: 0xde, b8: 0xb3 }],
148
+ ["white", { r8: 0xff, g8: 0xff, b8: 0xff }],
149
+ ["whitesmoke", { r8: 0xf5, g8: 0xf5, b8: 0xf5 }],
150
+ ["yellow", { r8: 0xff, g8: 0xff, b8: 0x00 }],
151
+ ["yellowgreen", { r8: 0x9a, g8: 0xcd, b8: 0x32 }],
152
+ ]);
153
+ /** Every spelling the spec defines, aliases excluded. */
154
+ export function cssNamedColorNames() {
155
+ return new Set(CSS_NAMED_COLORS.keys());
156
+ }
157
+ /**
158
+ * The value a CSS colour keyword names, following aliases.
159
+ *
160
+ * @returns `null` for a keyword the spec does not define.
161
+ */
162
+ export function cssNamedColor(name) {
163
+ const lowerCasedName = name.toLowerCase();
164
+ const canonical = CSS_COLOR_ALIASES[lowerCasedName] ?? lowerCasedName;
165
+ return CSS_NAMED_COLORS.get(canonical) ?? null;
166
+ }
167
+ /**
168
+ * Given a CSS colour keyword, return the canonical spelling of it, following
169
+ * aliases.
170
+ *
171
+ * Returns `null` for a keyword the spec does not define.
172
+ */
173
+ export function cssNamedColorName(name) {
174
+ const lowerCasedName = name.toLowerCase();
175
+ const canonical = CSS_COLOR_ALIASES[lowerCasedName] ?? lowerCasedName;
176
+ return CSS_NAMED_COLORS.has(canonical) ? canonical : null;
177
+ }
178
+ //# sourceMappingURL=named-colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named-colors.js","sourceRoot":"","sources":["../src/named-colors.ts"],"names":[],"mappings":"AA0JA,MAAM,CAAC,MAAM,iBAAiB,GAE1B;IACH,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,eAAe;IAC9B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;CAChC,CAAC;AAOF,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAqB;IAC3D,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IAC/C,CAAC,cAAc,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IAClD,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IAChD,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IAC3C,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,I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c,GAAG,IAAI,CAAC,WAAW,EAAsC,CAAC;IAE9E,MAAM,SAAS,GACd,iBAAiB,CAAC,cAAmC,CAAC,IAAI,cAAc,CAAC;IAE1E,OAAO,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC7C,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAsC,CAAC;IAE9E,MAAM,SAAS,GACd,iBAAiB,CAAC,cAAmC,CAAC,IAAI,cAAc,CAAC;IAE1E,OAAO,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { CssColorLabels } from "../color-labels.js";
2
+ /** The language tag these labels were written for. */
3
+ export declare const LOCALE = "fr";
4
+ export declare const CSS_COLOR_LABELS: CssColorLabels;
5
+ //# sourceMappingURL=fr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/names/fr.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,sDAAsD;AACtD,eAAO,MAAM,MAAM,OAAO,CAAC;AAE3B,eAAO,MAAM,gBAAgB,EAAE,cA4I7B,CAAC"}