color-name-list 13.1.0 → 13.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -2
- package/changes.svg +3 -3
- package/dist/colornames.bestof.csv +6 -2
- package/dist/colornames.bestof.esm.js +1 -1
- package/dist/colornames.bestof.esm.mjs +1 -1
- package/dist/colornames.bestof.html +1 -1
- package/dist/colornames.bestof.json +1 -1
- package/dist/colornames.bestof.min.json +1 -1
- package/dist/colornames.bestof.scss +1 -1
- package/dist/colornames.bestof.umd.js +1 -1
- package/dist/colornames.bestof.xml +18 -2
- package/dist/colornames.bestof.yaml +14 -2
- package/dist/colornames.csv +9 -6
- package/dist/colornames.esm.js +1 -1
- package/dist/colornames.esm.mjs +1 -1
- package/dist/colornames.html +1 -1
- package/dist/colornames.json +1 -1
- package/dist/colornames.min.json +1 -1
- package/dist/colornames.scss +1 -1
- package/dist/colornames.short.csv +4 -2
- package/dist/colornames.short.esm.js +1 -1
- package/dist/colornames.short.esm.mjs +1 -1
- package/dist/colornames.short.html +1 -1
- package/dist/colornames.short.json +1 -1
- package/dist/colornames.short.min.json +1 -1
- package/dist/colornames.short.scss +1 -1
- package/dist/colornames.short.umd.js +1 -1
- package/dist/colornames.short.xml +10 -2
- package/dist/colornames.short.yaml +8 -2
- package/dist/colornames.umd.js +1 -1
- package/dist/colornames.xml +27 -15
- package/dist/colornames.yaml +21 -12
- package/dist/history.json +1 -1
- package/package.json +1 -1
- package/scripts/lib.js +2 -1
- package/src/colornames.csv +9 -6
- package/tests/duplicates.test.js +35 -16
- package/tests/title-case.test.js +82 -18
- package/vitest.config.js +5 -0
- /package/tests/{formats.test.js → formats.ci.test.js} +0 -0
- /package/tests/{imports.test.js → imports.ci.test.js} +0 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
[](https://www.npmjs.com/package/color-name-list)
|
|
14
14
|
[](https://github.com/sponsors/meodai)
|
|
15
15
|
|
|
16
|
-
A meticulously curated collection of
|
|
16
|
+
A meticulously curated collection of __30122__ unique color names, sourced from
|
|
17
17
|
[various references](#sources-) and thousands of thoughtful user contributions.
|
|
18
18
|
|
|
19
19
|
> The names of color function like a thread attached to a frightfully slender
|
|
@@ -64,7 +64,7 @@ Please review the [naming rules](CONTRIBUTING.md) before contributing!
|
|
|
64
64
|
To contribute via Git, edit the `src/colornames.csv` file
|
|
65
65
|
and ensure it builds correctly (`npm run ci && npm run build`).
|
|
66
66
|
|
|
67
|
-
## Color Count:
|
|
67
|
+
## Color Count: __30122__ 🎉
|
|
68
68
|
|
|
69
69
|
~__0.18%__ of the RGB color space
|
|
70
70
|
|
|
@@ -285,6 +285,52 @@ NamedColor namedColorFromNamedColor = colorNames.FindClosestColorName(customName
|
|
|
285
285
|
NamedColor randomColor = colorNames.GetRandomNamedColor();
|
|
286
286
|
```
|
|
287
287
|
|
|
288
|
+
### Usage Rust
|
|
289
|
+
|
|
290
|
+
Rust support is provided by
|
|
291
|
+
[philocalyst/color-names](https://github.com/philocalyst/color-names).
|
|
292
|
+
You can add it to your rust project with `cargo add colorsnamed`. See the
|
|
293
|
+
repository for more details. Basic usage is below.
|
|
294
|
+
|
|
295
|
+
#### Choosing colors
|
|
296
|
+
|
|
297
|
+
```rust
|
|
298
|
+
use colorsnamed;
|
|
299
|
+
|
|
300
|
+
let black = colorsnamed::Basic::Black;
|
|
301
|
+
let teal = colorsnamed::Basic::Teal;
|
|
302
|
+
let another = colorsnamed::Xkcd::Tea;
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
#### Getting colors
|
|
306
|
+
|
|
307
|
+
```rust
|
|
308
|
+
use colorsnamed;
|
|
309
|
+
|
|
310
|
+
// Get the relevant hex code
|
|
311
|
+
let red = colorsnamed::Basic::Red;
|
|
312
|
+
let hex = red.hex();
|
|
313
|
+
|
|
314
|
+
// Figure out if there is a matching color for a hex code!
|
|
315
|
+
let ex: colorsnamed::Basic = hex.try_into().unwrap();
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
#### Converting colors
|
|
319
|
+
|
|
320
|
+
```rust
|
|
321
|
+
use colorsnamed;
|
|
322
|
+
use colors;
|
|
323
|
+
use rgb::Rgb;
|
|
324
|
+
|
|
325
|
+
// Convert to the represention of your colorspace of choice.
|
|
326
|
+
let correct_color = red.color::<colors::Srgb>();
|
|
327
|
+
|
|
328
|
+
let red = colorsnamed::Basic::Red;
|
|
329
|
+
|
|
330
|
+
// Get the RGB representation
|
|
331
|
+
let rgb: Rgb = red.rgb();
|
|
332
|
+
```
|
|
333
|
+
|
|
288
334
|
## Sources 🗒
|
|
289
335
|
|
|
290
336
|
### Sources: Names 📇
|
package/changes.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 710">
|
|
2
2
|
<defs>
|
|
3
3
|
<style type="text/css">
|
|
4
4
|
@import url('https://rsms.me/inter/inter.css');
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
}
|
|
10
10
|
</style>
|
|
11
11
|
</defs>
|
|
12
|
-
<rect fill="#212121" x="0" y="0" width="600" height="
|
|
13
|
-
<text x="40" y="90" fill="#
|
|
12
|
+
<rect fill="#212121" x="0" y="0" width="600" height="710"/>
|
|
13
|
+
<text x="40" y="90" fill="#0ff0fe">Aqua</text><text x="40" y="160" fill="#e15acb">Barbiecore</text><text x="40" y="230" fill="#00ffff">Cyan</text><text x="40" y="300" fill="#cac0e1">Digital Lavender</text><text x="40" y="370" fill="#f4e386">Gen Z Yellow</text><text x="40" y="440" fill="#52928d">Green Agate</text><text x="40" y="510" fill="#e1fe52">Green Ooze</text><text x="40" y="580" fill="#7b7b7d">Millennial Grey</text><text x="40" y="650" fill="#f0dbd5">Porcelain Blush</text>
|
|
14
14
|
</svg>
|
|
@@ -95,7 +95,7 @@ Apricot Haze,#ffaaaa
|
|
|
95
95
|
Apricot Sherbet,#fbcd9f
|
|
96
96
|
Apricotta,#d8a48f
|
|
97
97
|
April Showers,#dadeb5
|
|
98
|
-
Aqua,#
|
|
98
|
+
Aqua,#0ff0fe
|
|
99
99
|
Aqua Fiesta,#96e2e1
|
|
100
100
|
Aquamarine,#2ee8bb
|
|
101
101
|
Aquarius,#2db0ce
|
|
@@ -207,6 +207,7 @@ Barbarossa,#a84734
|
|
|
207
207
|
Barbecue,#c26157
|
|
208
208
|
Barbera,#8b031c
|
|
209
209
|
Barberry,#ee1133
|
|
210
|
+
Barbiecore,#e15acb
|
|
210
211
|
Barista’s Favorite,#bb8d4e
|
|
211
212
|
Bark,#5f5854
|
|
212
213
|
Barolo,#71000e
|
|
@@ -954,7 +955,7 @@ Cursed Black,#131313
|
|
|
954
955
|
Cut the Mustard,#ba7f38
|
|
955
956
|
Cute Crab,#dd4444
|
|
956
957
|
Cuttlefish,#7fbbc2
|
|
957
|
-
Cyan,#
|
|
958
|
+
Cyan,#00ffff
|
|
958
959
|
Cyantific,#77c9c2
|
|
959
960
|
Cyber Neon Green,#00ff26
|
|
960
961
|
Cyber Yellow,#ffd400
|
|
@@ -1078,6 +1079,7 @@ Diamond,#faf7e2
|
|
|
1078
1079
|
Diamond Cut,#e9e9f0
|
|
1079
1080
|
Diamond White,#e2eff3
|
|
1080
1081
|
Diesel,#322c2b
|
|
1082
|
+
Digital Lavender,#cac0e1
|
|
1081
1083
|
Dijon Mustard,#e2ca73
|
|
1082
1084
|
Dill,#6f7755
|
|
1083
1085
|
Dim,#c8c2be
|
|
@@ -1727,6 +1729,7 @@ Green Goddess,#76ad83
|
|
|
1727
1729
|
Green Mana,#26b467
|
|
1728
1730
|
Green not Found,#404404
|
|
1729
1731
|
Green Olive,#8d8b55
|
|
1732
|
+
Green Ooze,#e1fe52
|
|
1730
1733
|
Green Priestess,#11dd55
|
|
1731
1734
|
Green Relict,#7b8762
|
|
1732
1735
|
Green Revolution,#009944
|
|
@@ -3366,6 +3369,7 @@ Poppy Flower,#ec5800
|
|
|
3366
3369
|
Poppy Pompadour,#6b3fa0
|
|
3367
3370
|
Poppy Red,#dd3845
|
|
3368
3371
|
Porcelain,#dddcdb
|
|
3372
|
+
Porcelain Blush,#f0dbd5
|
|
3369
3373
|
Porcelain Mint,#dbe7e1
|
|
3370
3374
|
Porcelain Skin,#ffe7eb
|
|
3371
3375
|
Porcini,#d9ae86
|