color-name-list 11.10.0 → 11.11.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/.github/workflows/linting.yml +2 -2
- package/.husky/pre-commit +2 -0
- package/CODE_OF_CONDUCT.md +1 -1
- package/README.md +68 -57
- package/changes.svg +3 -3
- package/dist/colornames.csv +1 -0
- 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.umd.js +1 -1
- package/dist/colornames.xml +4 -0
- package/dist/colornames.yaml +3 -0
- package/dist/history.json +1 -1
- package/package.json +7 -3
- package/scripts/build.js +61 -15
- package/scripts/sortSrc.js +57 -0
- package/src/colornames.csv +3 -2
package/.husky/pre-commit
CHANGED
package/CODE_OF_CONDUCT.md
CHANGED
|
@@ -53,7 +53,7 @@ further defined and clarified by project maintainers.
|
|
|
53
53
|
## Enforcement
|
|
54
54
|
|
|
55
55
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
56
|
-
reported by contacting the project team
|
|
56
|
+
reported by contacting the [project team](farbliste@neinei.uk). The project team
|
|
57
57
|
will review and investigate all complaints, and will respond in a way that it
|
|
58
58
|
deems appropriate to the circumstances. The project team is obligated to
|
|
59
59
|
maintain confidentiality with regard to the reporter of an incident.
|
package/README.md
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
<img
|
|
1
|
+
<img
|
|
2
|
+
align="left"
|
|
3
|
+
height="119"
|
|
4
|
+
width="119"
|
|
5
|
+
src="https://meodai.github.io/color-names/logo/cockatoo-fill.svg"
|
|
6
|
+
alt="Color Names Logo"
|
|
7
|
+
/>
|
|
2
8
|
|
|
3
9
|
# Color Names
|
|
4
10
|
|
|
@@ -6,16 +12,16 @@
|
|
|
6
12
|
[](https://github.com/meodai/color-names/)
|
|
7
13
|
[](https://www.npmjs.com/package/color-name-list)
|
|
8
14
|
[](https://www.npmjs.com/package/color-name-list)
|
|
9
|
-
[](https://github.com/meodai/color-names/blob/main/src/colornames.csv)
|
|
10
16
|
[](https://github.com/sponsors/meodai)
|
|
11
17
|
|
|
12
|
-
A
|
|
13
|
-
[various
|
|
18
|
+
A meticulously curated collection of __30292__ unique color names, sourced from
|
|
19
|
+
[various references](#sources-) and thousands of thoughtful user contributions.
|
|
14
20
|
|
|
15
21
|
> The names of color function like a thread attached to a frightfully slender
|
|
16
22
|
> needle, capable of stitching together our most delicate emotions and memories.
|
|
17
23
|
> When the needle hits the target, we feel either pleasure or empathy.
|
|
18
|
-
>
|
|
24
|
+
> __Kenya Hara – White__
|
|
19
25
|
|
|
20
26
|
<p>
|
|
21
27
|
<a href="#explore-">Explore / Find Names</a>
|
|
@@ -31,54 +37,61 @@ A handpicked list of **30290** unique color names from
|
|
|
31
37
|
|
|
32
38
|
## About 📋
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
while
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
This project aims to assemble the largest possible list of color names,
|
|
41
|
+
while maintaining high standards for name quality. We have merged numerous
|
|
42
|
+
[lists](#sources-), resolved duplicate names with different hex values,
|
|
43
|
+
and adjusted colors where identical values had different names.
|
|
38
44
|
|
|
39
45
|
## Explore 🌍
|
|
40
46
|
|
|
41
|
-
- [Color Picker & Name Search] Click the wheel to
|
|
42
|
-
use the full text search.
|
|
43
|
-
- [Color Picker]: Click the colored
|
|
44
|
-
|
|
45
|
-
- [Color Picker II]: Move your mouse and scroll to
|
|
46
|
-
- [Name Search]: full text search on the color list.
|
|
47
|
-
- [Color Distribution] 3D
|
|
48
|
-
|
|
47
|
+
- [Color Picker & Name Search]: Click the wheel to discover a color name,
|
|
48
|
+
or use the full text search.
|
|
49
|
+
- [Color Picker]: Click the colored area to change the color or enter a hex
|
|
50
|
+
value below the name.
|
|
51
|
+
- [Color Picker II]: Move your mouse and scroll to select a color.
|
|
52
|
+
- [Name Search]: Perform a full text search on the color list.
|
|
53
|
+
- [Color Distribution]: Explore a 3D visualization of all color names in various
|
|
54
|
+
color models.
|
|
55
|
+
- [Twitter Bot]: Posts random colors and allows you to submit new ones.
|
|
49
56
|
|
|
50
57
|
## Color Name Submission 💌
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
/ or [twitter 🐦](https://twitter.com/color_parrot)
|
|
59
|
+
__[via form 🌈](https://docs.google.com/forms/d/e/1FAIpQLSfbS5D6owA4dQupJJ-6qhRzuxkjX9r2AliPMg-VR2V3NpGkQg/viewform)
|
|
60
|
+
/ or [twitter 🐦](https://twitter.com/color_parrot)__
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
Please review the [naming rules](CONTRIBUTING.md) before contributing!
|
|
56
63
|
|
|
57
64
|
### Contributing via Git 🫱🏽🫲🏻
|
|
58
65
|
|
|
59
|
-
|
|
60
|
-
and
|
|
66
|
+
To contribute via Git, edit the `src/colornames.csv` file
|
|
67
|
+
and ensure it builds correctly (`npm run ci && npm run build`).
|
|
61
68
|
|
|
62
|
-
## Color Count:
|
|
69
|
+
## Color Count: __30292__ 🎉
|
|
63
70
|
|
|
64
|
-
|
|
71
|
+
~__0.18%__ of the RGB color space
|
|
65
72
|
|
|
66
73
|
## [Color distribution](https://codepen.io/meodai/full/zdgXJj/) 🛰
|
|
67
74
|
|
|
68
75
|

|
|
69
76
|
|
|
70
|
-
When
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
When creating new color names, it's essential to understand which areas of a
|
|
78
|
+
color space are crowded and where new names can be added. For example, our API
|
|
79
|
+
returns the closest `RGB` color to a given `HEX` value. To prevent too many
|
|
80
|
+
colors from mapping to the same name, we strive for an even distribution in
|
|
81
|
+
color space: [Visualization](https://codepen.io/meodai/full/zdgXJj/)
|
|
75
82
|
|
|
76
83
|
## Usage 📖
|
|
77
84
|
|
|
85
|
+
### Consuming the list
|
|
86
|
+
|
|
87
|
+
The list is available in [multiple formats](https://app.unpkg.com/color-name-list/files/dist),
|
|
88
|
+
or you can use the [public REST API](#api-), making it easy to integrate into
|
|
89
|
+
your project.
|
|
90
|
+
|
|
78
91
|
### Node.js Installation 📦
|
|
79
92
|
|
|
80
|
-
|
|
81
|
-
consider
|
|
93
|
+
__Size Warning (1.15 MB)__: For browser usage,
|
|
94
|
+
consider the [public rest API](#api-)
|
|
82
95
|
|
|
83
96
|
```shell
|
|
84
97
|
npm install color-name-list --save
|
|
@@ -113,9 +126,8 @@ or `yarn add color-name-list`
|
|
|
113
126
|
|
|
114
127
|
### API 🃏
|
|
115
128
|
|
|
116
|
-
To
|
|
117
|
-
|
|
118
|
-
name lists. You can find the full API code and documentation
|
|
129
|
+
To simplify access, we provide a free and public REST API for all color names
|
|
130
|
+
and other public name lists. Full API code and documentation are available
|
|
119
131
|
[in this repository](https://github.com/meodai/color-name-api).
|
|
120
132
|
|
|
121
133
|
#### API Example Call Usage
|
|
@@ -126,16 +138,16 @@ https://api.color.pizza/v1/?values=00f,f00,f00&list=bestOf
|
|
|
126
138
|
|
|
127
139
|
#### API Disclaimer
|
|
128
140
|
|
|
129
|
-
The API is free
|
|
130
|
-
|
|
141
|
+
The API is free and has no usage limits. However, if your commercial app or site
|
|
142
|
+
generates excessive traffic, you may be asked to become a sponsor.
|
|
131
143
|
|
|
132
|
-
|
|
133
|
-
|
|
144
|
+
You are welcome to self-host the API—it's easy to deploy on Heroku and relies
|
|
145
|
+
only on a few dependencies: [Color-Name-API](https://github.com/meodai/color-name-api)
|
|
134
146
|
|
|
135
147
|
### Usage JS ⌨
|
|
136
148
|
|
|
137
|
-
|
|
138
|
-
consider
|
|
149
|
+
__Size Warning (1.15 MB)__: For browser usage,
|
|
150
|
+
consider the [public rest API](#api-)
|
|
139
151
|
|
|
140
152
|
#### Exact Color
|
|
141
153
|
|
|
@@ -151,14 +163,14 @@ console.log(someColor.hex); // => #16161d
|
|
|
151
163
|
|
|
152
164
|
#### Closest Named Color
|
|
153
165
|
|
|
154
|
-
|
|
155
|
-
[nearest-color] or [ClosestVector] to
|
|
166
|
+
With 16,777,216 possible RGB colors, you may want to use a library such as
|
|
167
|
+
[nearest-color] or [ClosestVector] to find the closest named color.
|
|
156
168
|
|
|
157
169
|
```js
|
|
158
170
|
import nearestColor from 'nearest-color';
|
|
159
171
|
import { colornames } from 'color-name-list';
|
|
160
172
|
|
|
161
|
-
// nearestColor
|
|
173
|
+
// nearestColor expects an object {name => hex}
|
|
162
174
|
const colors = colornames.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {});
|
|
163
175
|
|
|
164
176
|
const nearest = nearestColor.from(colors);
|
|
@@ -167,8 +179,8 @@ const nearest = nearestColor.from(colors);
|
|
|
167
179
|
nearest('#f1c1d1'); // => Fairy Tale
|
|
168
180
|
```
|
|
169
181
|
|
|
170
|
-
|
|
171
|
-
|
|
182
|
+
__Note__: For greater visual accuracy, consider using [DeltaE] or the above
|
|
183
|
+
approach with [ciecam02] instead of RGB.
|
|
172
184
|
|
|
173
185
|
[DeltaE]: https://github.com/zschuessler/DeltaE
|
|
174
186
|
[ciecam02]: https://github.com/baskerville/ciecam02
|
|
@@ -179,13 +191,13 @@ use [DeltaE] or use the above snippet, but using [ciecam02] instead of RGB.
|
|
|
179
191
|
npm install && npm run build
|
|
180
192
|
```
|
|
181
193
|
|
|
182
|
-
See [package.json](package.json#L6) for
|
|
194
|
+
See [package.json](package.json#L6) for details.
|
|
183
195
|
|
|
184
196
|
### Usage Java/Kotlin ⌨
|
|
185
197
|
|
|
186
|
-
Java/Kotlin
|
|
198
|
+
Java/Kotlin support is provided by:
|
|
187
199
|
[UwUAroze/Color-Names](https://github.com/UwUAroze/Color-Names).
|
|
188
|
-
|
|
200
|
+
See the repository for more, or use the basics below:
|
|
189
201
|
|
|
190
202
|
#### Importing - Gradle.kts
|
|
191
203
|
|
|
@@ -240,9 +252,9 @@ val fromColor = colorNames.getName(Color(255, 219, 240)) // "Silky Pink"
|
|
|
240
252
|
|
|
241
253
|
### Usage C# ⌨
|
|
242
254
|
|
|
243
|
-
C#
|
|
255
|
+
C# support is provided by:
|
|
244
256
|
[vycdev/ColorNamesSharp](https://github.com/vycdev/ColorNamesSharp)
|
|
245
|
-
|
|
257
|
+
See the repository for more details; basic usage is below:
|
|
246
258
|
|
|
247
259
|
The library is available as a [nuget package](https://www.nuget.org/packages/ColorNamesSharp)
|
|
248
260
|
|
|
@@ -334,6 +346,7 @@ NamedColor randomColor = colorNames.GetRandomNamedColor();
|
|
|
334
346
|
- [Myriam Aerne] 40CHF
|
|
335
347
|
- [Amin] 15USD
|
|
336
348
|
- [neverything] 25USD/month
|
|
349
|
+
- [Dmitry Iv.] 10USD/month
|
|
337
350
|
|
|
338
351
|
### Project Costs USD
|
|
339
352
|
|
|
@@ -380,12 +393,11 @@ NamedColor randomColor = colorNames.GetRandomNamedColor();
|
|
|
380
393
|
|
|
381
394
|
## Disclaimer 👮🏾
|
|
382
395
|
|
|
383
|
-
|
|
384
|
-
remove
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
so that we can remove them promptly.
|
|
396
|
+
We are committed to fostering an inclusive and respectful environment.
|
|
397
|
+
We actively remove any offensive, racist, or protected brand names from our
|
|
398
|
+
list. While we strive to screen out such names, some may inadvertently remain.
|
|
399
|
+
If you encounter any, please [let us know](https://github.com/meodai/color-names/issues/new?title=Bad%20color%20name)
|
|
400
|
+
so we can address them promptly.
|
|
389
401
|
|
|
390
402
|
## Latest Color Names 🔖
|
|
391
403
|
|
|
@@ -436,7 +448,6 @@ so that we can remove them promptly.
|
|
|
436
448
|
[BlueChaos]: https://www.instagram.com/bluechaos1811/
|
|
437
449
|
[Dmitry Iv.]: https://github.com/dy
|
|
438
450
|
[neverything]: https://neverything.me/
|
|
439
|
-
[colorkit.co]: https://colorkit.co/
|
|
440
451
|
[Myriam Aerne]: https://fynoeggeli.ch/
|
|
441
452
|
[nachtfunke]: https://helloyes.dev
|
|
442
453
|
[amin]: http://www.slashui.com
|
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 150">
|
|
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="150"/>
|
|
13
|
+
<text x="40" y="90" fill="#00e6d3">MoS₂ Cyan</text>
|
|
14
14
|
</svg>
|
package/dist/colornames.csv
CHANGED
|
@@ -17445,6 +17445,7 @@ Morro Bay,#546b78
|
|
|
17445
17445
|
Morrow White,#fcfccf
|
|
17446
17446
|
Mortar,#565051
|
|
17447
17447
|
Mortar Grey,#9e9f9e
|
|
17448
|
+
MoS₂ Cyan,#00e6d3
|
|
17448
17449
|
Mosaic Blue,#007c94
|
|
17449
17450
|
Mosaic Green,#599f68
|
|
17450
17451
|
Mosaic Tile,#1c6b69
|