color-name-list 13.12.0 → 13.13.1
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/CONTRIBUTING.md +14 -4
- package/README.md +31 -4
- package/changes.svg +3 -3
- package/dist/colornames.bestof.csv +3 -0
- 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 +12 -0
- package/dist/colornames.bestof.yaml +9 -0
- package/dist/colornames.csv +7 -1
- 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 +1 -0
- 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 +4 -0
- package/dist/colornames.short.yaml +3 -0
- package/dist/colornames.umd.js +1 -1
- package/dist/colornames.xml +28 -4
- package/dist/colornames.yaml +21 -3
- package/dist/history.json +1 -1
- package/package.json +1 -1
- package/scripts/build.js +2 -2
- package/src/colornames.csv +7 -1
package/CONTRIBUTING.md
CHANGED
|
@@ -7,17 +7,26 @@ interactions with the project.
|
|
|
7
7
|
|
|
8
8
|
## Adding colors
|
|
9
9
|
|
|
10
|
-
1. Only update the `src/colornames.csv` file and run `npm
|
|
10
|
+
1. Only update the `src/colornames.csv` file and run `npm test`.
|
|
11
11
|
2. Make sure the names you commit are not racist or offensive or a protected
|
|
12
12
|
brand name (No Facebook Blue, Coca Cola Red etc.., no nationality or tan etc..).
|
|
13
13
|
3. Read the "Rules for new color names" directly below
|
|
14
14
|
4. Make sure that neither name nor hex value of your added colors are already
|
|
15
|
-
|
|
16
|
-
5.
|
|
17
|
-
|
|
15
|
+
in use. `npm test` will test that for you.
|
|
16
|
+
5. Do not edit generated files. Do not commit changes to `README.md`,
|
|
17
|
+
`changes.svg` or anything in `dist/`.
|
|
18
|
+
6. Add the source of your colors in the Pull Request description.
|
|
19
|
+
Maintainers will update documentation if needed.
|
|
18
20
|
|
|
19
21
|
**We use automated semantic versioning** make sure to use git cz (or npm run commit).
|
|
20
22
|
|
|
23
|
+
## Generated files and CI
|
|
24
|
+
|
|
25
|
+
- PRs run `npm ci`, `npm run build`, and `npm test` in CI.
|
|
26
|
+
- CI may update `README.md` and `changes.svg` automatically and push
|
|
27
|
+
to your PR branch.
|
|
28
|
+
- Do not include generated files (`dist/`, `README.md`, `changes.svg`) in commits.
|
|
29
|
+
|
|
21
30
|
## Rules for new color names
|
|
22
31
|
|
|
23
32
|
- No duplicate names or hex values.
|
|
@@ -41,6 +50,7 @@ interactions with the project.
|
|
|
41
50
|
**feat(colors): Add fantastic new colors names.** rather then
|
|
42
51
|
feat(colors): Added new names.
|
|
43
52
|
- Make sure to run `npm run test` before committing.
|
|
53
|
+
For color name changes this is the only command you need locally.
|
|
44
54
|
|
|
45
55
|
### Attribution
|
|
46
56
|
|
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 __29985__ 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
|
|
@@ -62,9 +62,20 @@ Please review the [naming rules](CONTRIBUTING.md) before contributing!
|
|
|
62
62
|
### Contributing via Git 🫱🏽🫲🏻
|
|
63
63
|
|
|
64
64
|
To contribute via Git, edit the `src/colornames.csv` file
|
|
65
|
-
and ensure
|
|
65
|
+
and ensure tests pass locally (`npm test`).
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
See the full guidelines in [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
68
|
+
|
|
69
|
+
CI notes:
|
|
70
|
+
|
|
71
|
+
- Pull Requests run `npm ci`, `npm run build`, and `npm test`.
|
|
72
|
+
- CI auto-updates `README.md` and `changes.svg` if needed and pushes to your PR branch.
|
|
73
|
+
- Do not commit generated files (`dist/`, `changes.svg`).
|
|
74
|
+
- For color name changes, only submit updates to `src/colornames.csv`.
|
|
75
|
+
- No need to run `npm run build` locally; CI generates outputs.
|
|
76
|
+
- Optional locally: `npm run lint:markdown` to match CI markdown checks.
|
|
77
|
+
|
|
78
|
+
## Color Count: __29985__ 🎉
|
|
68
79
|
|
|
69
80
|
~__0.18%__ of the RGB color space
|
|
70
81
|
|
|
@@ -144,9 +155,15 @@ only on a few dependencies: [Color-Name-API](https://github.com/meodai/color-nam
|
|
|
144
155
|
|
|
145
156
|
### Usage JS ⌨
|
|
146
157
|
|
|
147
|
-
__Size Warning (1.
|
|
158
|
+
__Size Warning (1.14 MB)__: For browser usage,
|
|
148
159
|
consider the [public rest API](#api-)
|
|
149
160
|
|
|
161
|
+
#### Data Shape
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
type ColorName = { name: string; hex: string };
|
|
165
|
+
```
|
|
166
|
+
|
|
150
167
|
#### Exact Color
|
|
151
168
|
|
|
152
169
|
```javascript
|
|
@@ -159,6 +176,16 @@ let someNamedColor = colornames.find((color) => color.name === 'Eigengrau');
|
|
|
159
176
|
console.log(someColor.hex); // => #16161d
|
|
160
177
|
```
|
|
161
178
|
|
|
179
|
+
#### CommonJS
|
|
180
|
+
|
|
181
|
+
```js
|
|
182
|
+
// Returns the array directly when using CommonJS
|
|
183
|
+
const colornames = require('color-name-list');
|
|
184
|
+
|
|
185
|
+
const white = colornames.find((c) => c.hex === '#ffffff');
|
|
186
|
+
console.log(white.name); // => white
|
|
187
|
+
```
|
|
188
|
+
|
|
162
189
|
#### Closest Named Color
|
|
163
190
|
|
|
164
191
|
With 16,777,216 possible RGB colors, you may want to use a library such as
|
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 570">
|
|
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="570"/>
|
|
13
|
+
<text x="40" y="90" fill="#c8b960">Almond Puff</text><text x="40" y="160" fill="#5f1a10">Altar Wine</text><text x="40" y="230" fill="#83c0e5">Billow</text><text x="40" y="300" fill="#877732">Dragon Well</text><text x="40" y="370" fill="#363e7d">Evening Magic</text><text x="40" y="440" fill="#377b70">Pearl Green</text><text x="40" y="510" fill="#5e0e0b">Sacramental Red</text>
|
|
14
14
|
</svg>
|
|
@@ -1276,6 +1276,7 @@ Ethereal Moonlight,#d5e4ec
|
|
|
1276
1276
|
Ethereal Woods,#3e5e4e
|
|
1277
1277
|
Eucalyptus,#329760
|
|
1278
1278
|
Evening Glow,#fdd792
|
|
1279
|
+
Evening Magic,#363e7d
|
|
1279
1280
|
Everglade,#264334
|
|
1280
1281
|
Evergreen,#125b49
|
|
1281
1282
|
Everlasting Ice,#f6fdfa
|
|
@@ -3175,6 +3176,7 @@ Peanut Butter Jelly,#ce4a2d
|
|
|
3175
3176
|
Pear,#d1e231
|
|
3176
3177
|
Pearl,#eae0c8
|
|
3177
3178
|
Pearl Brite,#e6e6e3
|
|
3179
|
+
Pearl Green,#377b70
|
|
3178
3180
|
Pearl Powder,#faffed
|
|
3179
3181
|
Pearl White,#f3f2ed
|
|
3180
3182
|
Pearly,#f4e3df
|
|
@@ -3668,6 +3670,7 @@ Rusty Red,#af2f0d
|
|
|
3668
3670
|
Ruthless Empress,#573894
|
|
3669
3671
|
Sablé,#f6d8be
|
|
3670
3672
|
Sable Cloaked,#c4a7a1
|
|
3673
|
+
Sacramental Red,#5e0e0b
|
|
3671
3674
|
Sacred Scarlet,#950c1b
|
|
3672
3675
|
Sacrifice Altar,#850101
|
|
3673
3676
|
Sacro Bosco,#229911
|