chromonym 1.4.1 → 3.0.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/NOTICE.md +64 -4
- package/README.md +290 -83
- package/dist/conversions/hex.d.ts +1 -1
- package/dist/conversions/hex.d.ts.map +1 -1
- package/dist/conversions/hex.js +2 -2
- package/dist/conversions/hex.js.map +1 -1
- package/dist/conversions/hsl.d.ts +1 -1
- package/dist/conversions/hsl.d.ts.map +1 -1
- package/dist/conversions/hsl.js +2 -2
- package/dist/conversions/hsl.js.map +1 -1
- package/dist/conversions/hsv.d.ts +1 -1
- package/dist/conversions/hsv.d.ts.map +1 -1
- package/dist/conversions/hsv.js +2 -2
- package/dist/conversions/hsv.js.map +1 -1
- package/dist/conversions/index.d.ts +5 -5
- package/dist/conversions/index.d.ts.map +1 -1
- package/dist/conversions/index.js +5 -5
- package/dist/conversions/index.js.map +1 -1
- package/dist/conversions/pantone.d.ts +9 -7
- package/dist/conversions/pantone.d.ts.map +1 -1
- package/dist/conversions/pantone.js +11 -10
- package/dist/conversions/pantone.js.map +1 -1
- package/dist/conversions/rgb.d.ts +1 -1
- package/dist/conversions/rgb.d.ts.map +1 -1
- package/dist/conversions/rgb.js +1 -1
- package/dist/conversions/rgb.js.map +1 -1
- package/dist/convert.d.ts +45 -5
- package/dist/convert.d.ts.map +1 -1
- package/dist/convert.js +68 -17
- package/dist/convert.js.map +1 -1
- package/dist/detectFormat.d.ts +1 -1
- package/dist/detectFormat.d.ts.map +1 -1
- package/dist/detectFormat.js +2 -6
- package/dist/detectFormat.js.map +1 -1
- package/dist/identify.d.ts +41 -19
- package/dist/identify.d.ts.map +1 -1
- package/dist/identify.js +37 -22
- package/dist/identify.js.map +1 -1
- package/dist/index.d.ts +15 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -13
- package/dist/index.js.map +1 -1
- package/dist/indexing.d.ts +48 -24
- package/dist/indexing.d.ts.map +1 -1
- package/dist/indexing.js +111 -22
- package/dist/indexing.js.map +1 -1
- package/dist/math/clamp.d.ts.map +1 -1
- package/dist/math/clamp.js.map +1 -1
- package/dist/math/colorSpace.d.ts +1 -1
- package/dist/math/colorSpace.d.ts.map +1 -1
- package/dist/math/colorSpace.js.map +1 -1
- package/dist/math/deltaE.d.ts.map +1 -1
- package/dist/math/deltaE.js.map +1 -1
- package/dist/math/editDistance.d.ts +17 -0
- package/dist/math/editDistance.d.ts.map +1 -0
- package/dist/math/editDistance.js +48 -0
- package/dist/math/editDistance.js.map +1 -0
- package/dist/math/euclideanDistance.d.ts +1 -1
- package/dist/math/euclideanDistance.d.ts.map +1 -1
- package/dist/math/euclideanDistance.js.map +1 -1
- package/dist/math/hueSector.d.ts.map +1 -1
- package/dist/math/hueSector.js.map +1 -1
- package/dist/palettes/crayola.d.ts +200 -0
- package/dist/palettes/crayola.d.ts.map +1 -0
- package/dist/palettes/crayola.js +121 -0
- package/dist/palettes/crayola.js.map +1 -0
- package/dist/palettes/index.d.ts +5 -0
- package/dist/palettes/index.d.ts.map +1 -0
- package/dist/palettes/index.js +5 -0
- package/dist/palettes/index.js.map +1 -0
- package/dist/palettes/normalize.d.ts +17 -0
- package/dist/palettes/normalize.d.ts.map +1 -0
- package/dist/palettes/normalize.js +19 -0
- package/dist/palettes/normalize.js.map +1 -0
- package/dist/palettes/pantone.d.ts +1834 -0
- package/dist/palettes/pantone.d.ts.map +1 -0
- package/dist/palettes/pantone.js +925 -0
- package/dist/palettes/pantone.js.map +1 -0
- package/dist/palettes/web.d.ts +320 -0
- package/dist/palettes/web.d.ts.map +1 -0
- package/dist/{colorspaces → palettes}/web.js +18 -3
- package/dist/palettes/web.js.map +1 -0
- package/dist/palettes/x11.d.ts +1346 -0
- package/dist/palettes/x11.d.ts.map +1 -0
- package/dist/palettes/x11.js +686 -0
- package/dist/palettes/x11.js.map +1 -0
- package/dist/resolve.d.ts +42 -7
- package/dist/resolve.d.ts.map +1 -1
- package/dist/resolve.js +48 -20
- package/dist/resolve.js.map +1 -1
- package/dist/types.d.ts +10 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -1
- package/dist/types.js.map +1 -1
- package/package.json +38 -18
- package/dist/colorspaces/index.d.ts +0 -4
- package/dist/colorspaces/index.d.ts.map +0 -1
- package/dist/colorspaces/index.js +0 -4
- package/dist/colorspaces/index.js.map +0 -1
- package/dist/colorspaces/pantone.d.ts +0 -919
- package/dist/colorspaces/pantone.d.ts.map +0 -1
- package/dist/colorspaces/pantone.js +0 -918
- package/dist/colorspaces/pantone.js.map +0 -1
- package/dist/colorspaces/registry.d.ts +0 -26
- package/dist/colorspaces/registry.d.ts.map +0 -1
- package/dist/colorspaces/registry.js +0 -36
- package/dist/colorspaces/registry.js.map +0 -1
- package/dist/colorspaces/web.d.ts +0 -156
- package/dist/colorspaces/web.d.ts.map +0 -1
- package/dist/colorspaces/web.js.map +0 -1
- package/dist/colorspaces/x11.d.ts +0 -667
- package/dist/colorspaces/x11.d.ts.map +0 -1
- package/dist/colorspaces/x11.js +0 -666
- package/dist/colorspaces/x11.js.map +0 -1
package/NOTICE.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
**not affiliated with, endorsed by, licensed by, or certified by Pantone
|
|
7
7
|
LLC**.
|
|
8
8
|
|
|
9
|
-
The `pantone`
|
|
9
|
+
The `pantone` palette in this library ships **community-derived sRGB
|
|
10
10
|
approximations** of the Pantone Coated (C) color set, sourced from
|
|
11
11
|
[`color_library`](https://github.com/draganradu/color_library) (MIT © Radu
|
|
12
12
|
Dragan). These values:
|
|
@@ -16,21 +16,81 @@ Dragan). These values:
|
|
|
16
16
|
exactly.
|
|
17
17
|
- Are intended for on-screen reference, nearest-name identification, and
|
|
18
18
|
general tooling — **not for print color specification**.
|
|
19
|
-
- Use standard color codes (e.g. `
|
|
19
|
+
- Use standard color codes (e.g. `185 C`) as **nominative references** to
|
|
20
20
|
publicly identified Pantone colors. No endorsement or claim of accuracy
|
|
21
21
|
is implied.
|
|
22
22
|
|
|
23
|
+
### Accuracy envelope
|
|
24
|
+
|
|
25
|
+
The approximations are closest for mid-chroma colors under a D65 / 2°
|
|
26
|
+
observer. As a rough guide:
|
|
27
|
+
|
|
28
|
+
- **Mid-chroma Pantones**: ΔE*00 ≲ 5 versus Pantone's own sRGB previews.
|
|
29
|
+
Usable for nearest-name identification and comparative swatch UI.
|
|
30
|
+
- **Saturated edges**: ΔE*00 commonly 5–10, higher in the deep-blue and
|
|
31
|
+
blue-violet region (~2736 C through ~2746 C). `identify` will still
|
|
32
|
+
converge on a plausible neighbor, but the *which* can depend on metric
|
|
33
|
+
choice — see the "Distance metrics" section of the README.
|
|
34
|
+
- **Fluorescents (801 C – 814 C)** and the **metallic series (8xxx C)**
|
|
35
|
+
are defined outside the sRGB gamut. Their sRGB approximations are
|
|
36
|
+
perceptually wrong by construction — the physical inks can't be
|
|
37
|
+
reproduced on a standard monitor. Do not use these values as a
|
|
38
|
+
reference for brand-critical matching; identify carefully or skip.
|
|
39
|
+
- **Neons / warm reds** clipping against the sRGB gamut boundary (Pantone
|
|
40
|
+
Red 032 / Warm Red / Red 021 area) are approximated via hard clip.
|
|
41
|
+
|
|
42
|
+
### What `identify` does *not* guarantee
|
|
43
|
+
|
|
44
|
+
`identify(sampledRgba, { palette: pantone })` returns the nearest
|
|
45
|
+
entry **in the shipped sRGB approximation set**. It does **not** imply
|
|
46
|
+
that the physical ink bearing that Pantone code would match your sampled
|
|
47
|
+
color in a print workflow, under a different light source, or on
|
|
48
|
+
different paper stock. Pantone is a spectral specification; any
|
|
49
|
+
color-library lookup that rounds it through sRGB loses information.
|
|
50
|
+
|
|
23
51
|
If you need Pantone-certified color values, consult Pantone directly:
|
|
24
52
|
<https://www.pantone.com/>.
|
|
25
53
|
|
|
54
|
+
## Crayola®
|
|
55
|
+
|
|
56
|
+
**Crayola®** is a registered trademark of **Crayola LLC**. Chromonym is
|
|
57
|
+
**not affiliated with, endorsed by, licensed by, or certified by Crayola
|
|
58
|
+
LLC**.
|
|
59
|
+
|
|
60
|
+
The `crayola` palette in this library ships a **community-curated
|
|
61
|
+
subset** of Crayola crayon-color names with sRGB approximations of their
|
|
62
|
+
wrappers. The names are used as **nominative references** to publicly
|
|
63
|
+
identified Crayola colors — there is no trademark claim, and no
|
|
64
|
+
endorsement is implied. Hex values are derived from the widely-cited
|
|
65
|
+
Wikipedia list of Crayola crayon colors (CC BY-SA), which itself cites
|
|
66
|
+
Crayola's published approximations.
|
|
67
|
+
|
|
68
|
+
### Scope
|
|
69
|
+
|
|
70
|
+
The shipped set is ~85 entries — the current 64-standard box, the
|
|
71
|
+
iconic fluorescent "Neon" range, and widely-recognized modern
|
|
72
|
+
additions. It is not exhaustive: historical, retired, specialty-box
|
|
73
|
+
(Gem Tones, Heads 'N Tails, Multicultural, etc.), and regional-variant
|
|
74
|
+
colors are not included. If you need a specific Crayola color that
|
|
75
|
+
isn't present, open an issue or define a BYO palette.
|
|
76
|
+
|
|
77
|
+
### Accuracy
|
|
78
|
+
|
|
79
|
+
- Fluorescents and neons saturate outside sRGB by design; on-screen
|
|
80
|
+
sRGB approximations are necessarily softer than the physical crayons.
|
|
81
|
+
- Metallics (Silver, Gold, Copper) are flat sRGB approximations; the
|
|
82
|
+
physical crayons' reflective behavior is lost.
|
|
83
|
+
- Classic hues are close enough for comparative UI / identification
|
|
84
|
+
work but should not be used as a reference for print color matching.
|
|
85
|
+
|
|
26
86
|
## X11 / X.Org
|
|
27
87
|
|
|
28
|
-
The `x11`
|
|
88
|
+
The `x11` palette is derived from the X.Org `rgb.txt` file, which is in
|
|
29
89
|
the public domain.
|
|
30
90
|
|
|
31
91
|
## CSS / SVG named colors
|
|
32
92
|
|
|
33
|
-
The `web`
|
|
93
|
+
The `web` palette mirrors the CSS Color Module Level 4 named-color
|
|
34
94
|
set, which is a public specification.
|
|
35
95
|
|
|
36
96
|
## Upstream dependencies
|