color-name-list 11.0.0 → 11.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.
@@ -15,7 +15,7 @@ jobs:
15
15
 
16
16
  strategy:
17
17
  matrix:
18
- node-version: [15.x, 16.x]
18
+ node-version: [20.x]
19
19
 
20
20
  steps:
21
21
  - uses: actions/checkout@v2
@@ -14,7 +14,7 @@ jobs:
14
14
  - name: Setup Node.js
15
15
  uses: actions/setup-node@v1
16
16
  with:
17
- node-version: 19
17
+ node-version: 20
18
18
  - name: Install dependencies
19
19
  run: npm ci
20
20
  - name: Test
package/README.md CHANGED
@@ -6,10 +6,10 @@
6
6
  [![GitHub release](https://img.shields.io/github/release/meodai/color-names.svg)](https://github.com/meodai/color-names/)
7
7
  [![npm version](https://img.shields.io/npm/v/color-name-list.svg)](https://www.npmjs.com/package/color-name-list)
8
8
  [![npm](https://img.shields.io/npm/dt/color-name-list.svg)](https://www.npmjs.com/package/color-name-list)
9
- [![name count](https://img.shields.io/badge/__30242__-names-orange.svg)](https://github.com/meodai/color-names/blob/master/src/colornames.csv)
9
+ [![name count](https://img.shields.io/badge/__30261__-names-orange.svg)](https://github.com/meodai/color-names/blob/master/src/colornames.csv)
10
10
  [![github sponsor count](https://img.shields.io/github/sponsors/meodai)](https://github.com/sponsors/meodai)
11
11
 
12
- A handpicked list of __30242__ unique color names from
12
+ A handpicked list of __30261__ unique color names from
13
13
  [various sources](#sources-) and thousands of curated user submissions.
14
14
 
15
15
  > The names of color function like a thread attached to a frightfully slender
@@ -23,7 +23,7 @@ A handpicked list of __30242__ unique color names from
23
23
  | <a href="#usage-">Usage</a>
24
24
  | <a href="#cdn-">CDN</a>
25
25
  | <a href="#api-">Public Rest API</a>
26
- | <a href="#usage-js-">Usage JS/Java/Kotlin</a>
26
+ | <a href="#usage-js-">Usage JS/Java/Kotlin/C#</a>
27
27
  | <a href="#sources-">Name Sources</a>
28
28
  | <a href="#latest-color-names-">Latest Color Names</a>
29
29
  | <a href="#costs--sponsors">Sponsors</a>
@@ -54,7 +54,7 @@ __[via form 🌈](https://docs.google.com/forms/d/e/1FAIpQLSfbS5D6owA4dQupJJ-6qh
54
54
 
55
55
  Make sure to read the [naming rules](CONTRIBUTING.md) before you contribute!
56
56
 
57
- ## Color Count: __30242__ 🎉
57
+ ## Color Count: __30261__ 🎉
58
58
 
59
59
  ~__0.18%__ of the RGB color space
60
60
 
@@ -233,6 +233,43 @@ val fromRGB = colorNames.getName(224, 224, 255) // "Stoic White"
233
233
  val fromColor = colorNames.getName(Color(255, 219, 240)) // "Silky Pink"
234
234
  ```
235
235
 
236
+ ### Usage C# ⌨
237
+
238
+ C# usage is maintained through this library:
239
+ [vycdev/ColorNamesSharp](https://github.com/vycdev/ColorNamesSharp)
240
+ Additional info can be found there, but basic usage is outlined below:
241
+
242
+ The library is available as a [nuget package](https://www.nuget.org/packages/ColorNamesSharp)
243
+
244
+ #### Creating the instance
245
+
246
+ ```csharp
247
+ ColorNames colorNames = new ColorNamesBuilder()
248
+ .Add("Best Blue", "#3299fe") // Add your own custom colors
249
+ .LoadDefault() // Load the default color list
250
+ .AddFromCsv("path/to/your/colorlist.csv") // Add a custom color list from a csv file
251
+ .Build(); // Get a new ColorNames instance that includes all the colors you've added
252
+ ```
253
+
254
+ #### Getting a fitting color name
255
+
256
+ ```csharp
257
+ NamedColor customNamedColor = new("Custom Named Color", 50, 153, 254);
258
+
259
+ // You can directly get the name of the color as a string
260
+ string colorNameFromHex = colorNames.FindClosestColorName("#facfea"); // Classic Rose
261
+ string colorNameFromRgb = colorNames.FindClosestColorName(224, 224, 255); // Stoic White
262
+ string colorNameFromNamedColor = colorNames.FindClosestColorName(customNamedColor); // Best Blue
263
+
264
+ // Or similarly you can get the NamedColor object
265
+ NamedColor namedColorFromHex = colorNames.FindClosestColorName("#facfea"); // Classic Rose
266
+ NamedColor namedColorFromRgb = colorNames.FindClosestColorName(224, 224, 255); // Stoic White
267
+ NamedColor namedColorFromNamedColor = colorNames.FindClosestColorName(customNamedColor); // Best Blue
268
+
269
+ // Or a random color
270
+ NamedColor randomColor = colorNames.GetRandomNamedColor();
271
+ ```
272
+
236
273
  ## Sources 🗒
237
274
 
238
275
  ### Sources: Names 📇
@@ -629,6 +629,7 @@ Celery Mousse,#c1fd95
629
629
  Celery Scepter,#e1df9a
630
630
  Celestial,#007894
631
631
  Celestial Cathedral,#daeaf6
632
+ Celestial Crown,#ead97c
632
633
  Celestial Horizon,#7c94b3
633
634
  Cement Feet,#7b737b
634
635
  Ceramic,#fcfff9
@@ -725,6 +726,7 @@ Cinder,#242a2e
725
726
  Cinderella,#fbd7cc
726
727
  Cinnamon,#d26911
727
728
  Cinnamon Buff,#ffbf6e
729
+ Cinnamon Sparkle,#9c5736
728
730
  Cinnapink,#a6646f
729
731
  Citadel,#6a7f8b
730
732
  Citrus,#9fb70a
@@ -1448,6 +1450,7 @@ Frost,#e1e4c5
1448
1450
  Frost Fairy,#bbcfef
1449
1451
  Frostbite,#acfffc
1450
1452
  Frosted Blueberries,#0055dd
1453
+ Frosted Fir,#b4d5bd
1451
1454
  Frosted Mint Hills,#ccffc2
1452
1455
  Frosty Pink,#dfe9e3
1453
1456
  Frothy Milk,#faede6
@@ -2602,6 +2605,7 @@ Minty Fresh,#d2f2e7
2602
2605
  Minty Paradise,#00ffbb
2603
2606
  Minute Mauve,#f2e4f5
2604
2607
  Mississippi River,#3b638c
2608
+ Mistletoe,#8aa282
2605
2609
  Misty Cold Sea,#83bbc1
2606
2610
  Misty Harbor,#65769a
2607
2611
  Misty Haze,#cec9c3
@@ -3095,6 +3099,7 @@ Pelati,#ff3333
3095
3099
  Pelican,#c1bcac
3096
3100
  Pepper Green,#007d58
3097
3101
  Peppermint,#d7e7d0
3102
+ Peppermint Swirl,#d35d7d
3098
3103
  Pepperoni,#aa4400
3099
3104
  Peppy Peacock,#55ccbb
3100
3105
  Peppy Pineapple,#ffff44
@@ -3697,6 +3702,7 @@ Silence,#eaede5
3697
3702
  Silent Film,#9fa5a5
3698
3703
  Silent Night,#526771
3699
3704
  Silent Sea,#3a4a63
3705
+ Silent Snowfall,#eef7fa
3700
3706
  Silk Dessou,#eee9dc
3701
3707
  Silk for the Gods,#ecddc9
3702
3708
  Silk Lining,#fcefe0
@@ -3919,6 +3925,7 @@ Such a Peach,#fbddaf
3919
3925
  Sugar Chic,#ffccff
3920
3926
  Sugar Coated,#ffedf1
3921
3927
  Sugar Cookie,#f2e2a4
3928
+ Sugar Cookie Crust,#e8cfb1
3922
3929
  Sugar Glaze,#fff0e1
3923
3930
  Sugar High,#efc9ec
3924
3931
  Sugar Milk,#fff9f5