color-name-list 13.0.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.
Files changed (47) hide show
  1. package/.github/workflows/build-and-release.yml +3 -3
  2. package/.github/workflows/build.yml +1 -1
  3. package/.husky/pre-commit +1 -1
  4. package/CONTRIBUTING.md +1 -1
  5. package/README.md +48 -2
  6. package/changes.svg +3 -3
  7. package/dist/colornames.bestof.csv +6 -2
  8. package/dist/colornames.bestof.esm.js +1 -1
  9. package/dist/colornames.bestof.esm.mjs +1 -1
  10. package/dist/colornames.bestof.html +1 -1
  11. package/dist/colornames.bestof.json +1 -1
  12. package/dist/colornames.bestof.min.json +1 -1
  13. package/dist/colornames.bestof.scss +1 -1
  14. package/dist/colornames.bestof.umd.js +1 -1
  15. package/dist/colornames.bestof.xml +18 -2
  16. package/dist/colornames.bestof.yaml +14 -2
  17. package/dist/colornames.csv +9 -6
  18. package/dist/colornames.esm.js +1 -1
  19. package/dist/colornames.esm.mjs +1 -1
  20. package/dist/colornames.html +1 -1
  21. package/dist/colornames.json +1 -1
  22. package/dist/colornames.min.json +1 -1
  23. package/dist/colornames.scss +1 -1
  24. package/dist/colornames.short.csv +4 -2
  25. package/dist/colornames.short.esm.js +1 -1
  26. package/dist/colornames.short.esm.mjs +1 -1
  27. package/dist/colornames.short.html +1 -1
  28. package/dist/colornames.short.json +1 -1
  29. package/dist/colornames.short.min.json +1 -1
  30. package/dist/colornames.short.scss +1 -1
  31. package/dist/colornames.short.umd.js +1 -1
  32. package/dist/colornames.short.xml +10 -2
  33. package/dist/colornames.short.yaml +8 -2
  34. package/dist/colornames.umd.js +1 -1
  35. package/dist/colornames.xml +27 -15
  36. package/dist/colornames.yaml +21 -12
  37. package/dist/history.json +1 -1
  38. package/package.json +2 -4
  39. package/scripts/lib.js +2 -1
  40. package/scripts/sortSrc.js +1 -1
  41. package/src/colornames.csv +10 -7
  42. package/tests/duplicate-allowlist.json +2 -1
  43. package/tests/duplicates.test.js +152 -21
  44. package/tests/title-case.test.js +384 -0
  45. package/vitest.config.js +5 -0
  46. /package/tests/{formats.test.js → formats.ci.test.js} +0 -0
  47. /package/tests/{imports.test.js → imports.ci.test.js} +0 -0
@@ -25,12 +25,12 @@ jobs:
25
25
  - name: Install dependencies
26
26
  run: npm ci
27
27
 
28
- - name: Test
29
- run: npm test
30
-
31
28
  - name: Build
32
29
  run: npm run build
33
30
 
31
+ - name: Test
32
+ run: npm test
33
+
34
34
  - name: Generate history file
35
35
  run: npm run history
36
36
 
@@ -22,8 +22,8 @@ jobs:
22
22
  node-version: ${{ matrix.node-version }}
23
23
  cache: 'npm'
24
24
  - run: npm ci
25
- - run: npm test
26
25
  - run: npm run build
26
+ - run: npm test
27
27
  - name: Check for changes
28
28
  id: git-check
29
29
  run: |
package/.husky/pre-commit CHANGED
@@ -1,3 +1,3 @@
1
1
  npm run lint
2
2
  npm run sort-colors
3
- npm run test:precommit
3
+ npm run test
package/CONTRIBUTING.md CHANGED
@@ -27,7 +27,7 @@ interactions with the project.
27
27
  - No protected brand-names (`Facebook Blue`, `Coca Cola Red`)
28
28
  - No enumerations (`Grey 1`, `Grey 2`, `Grey 3`, `Grey 4`)
29
29
  - British English spelling (ex. `Grey` not `Gray`), unless its something U.S. typical.
30
- - Capitalize colors: `Kind of Orange`
30
+ - Capitalize colors: `Kind of Orange` following [APA style](https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case)
31
31
  - Prefer common names, especially when adding colors of flora and fauna
32
32
  (plants and animals ;) ) ex. `Venus Slipper Orchid` instead of `Paphiopedilum`.
33
33
  - Avoid ethnic & racial assumptions
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
  [![npm](https://img.shields.io/npm/dt/color-name-list.svg)](https://www.npmjs.com/package/color-name-list)
14
14
  [![github sponsor count](https://img.shields.io/github/sponsors/meodai)](https://github.com/sponsors/meodai)
15
15
 
16
- A meticulously curated collection of __30119__ unique color names, sourced from
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: __30119__ 🎉
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 990">
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="990"/>
13
- <text x="40" y="90" fill="#903f45">Apple-a-Day</text><text x="40" y="160" fill="#e7d9b9">At the Beach</text><text x="40" y="230" fill="#a0b7ba">Blue by You</text><text x="40" y="300" fill="#babfc5">Blue to You</text><text x="40" y="370" fill="#145775">Broadway</text><text x="40" y="440" fill="#ddbda3">Brown-Bag It</text><text x="40" y="510" fill="#8d999e">By the Sea</text><text x="40" y="580" fill="#ba7f38">Cut the Mustard</text><text x="40" y="650" fill="#44aa55">Devil’s Grass</text><text x="40" y="720" fill="#978c59">In a Pickle</text><text x="40" y="790" fill="#c92d21">Red Seal</text><text x="40" y="860" fill="#ffffbf">Sour Veil</text><text x="40" y="930" fill="#c4bf0b">Sweet &amp; Sour</text>
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,#00ffff
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,#0ff0fe
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