color-name-list 11.9.0 → 11.10.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/.gitattributes CHANGED
@@ -1,3 +1,4 @@
1
1
  * text=auto
2
2
 
3
3
  *.sh text eol=lf
4
+ *.csv text eol=lf
@@ -0,0 +1,57 @@
1
+ name: Build, Update History and Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ # Allow manual triggering
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ build-history-release:
11
+ name: Build, Update History and Release
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v3
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: Setup Node.js
20
+ uses: actions/setup-node@v3
21
+ with:
22
+ node-version: 20
23
+ cache: 'npm'
24
+
25
+ - name: Install dependencies
26
+ run: npm ci
27
+
28
+ - name: Test
29
+ run: npm test
30
+
31
+ - name: Build
32
+ run: npm run build
33
+
34
+ - name: Generate history file
35
+ run: npm run history
36
+
37
+ - name: Check for changes
38
+ id: git-check
39
+ run: |
40
+ git add README.md changes.svg
41
+ git diff --staged --quiet || echo "changes=true" >> $GITHUB_OUTPUT
42
+
43
+ - name: Commit changes if needed
44
+ if: steps.git-check.outputs.changes == 'true'
45
+ run: |
46
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
47
+ git config --local user.name "GitHub Action"
48
+ git commit -m "docs: update README.md and changes.svg [skip ci]"
49
+ git push https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:main
50
+ env:
51
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52
+
53
+ - name: Release
54
+ env:
55
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
57
+ run: npx semantic-release
@@ -1,13 +1,10 @@
1
- # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
1
+ # This workflow handles PR validation by running tests and build
3
2
 
4
- name: Build CI
3
+ name: PR Validation
5
4
 
6
5
  on:
7
- push:
8
- branches: [ master ]
9
6
  pull_request:
10
- branches: [ master ]
7
+ branches: [main]
11
8
 
12
9
  jobs:
13
10
  build:
@@ -15,14 +12,32 @@ jobs:
15
12
 
16
13
  strategy:
17
14
  matrix:
18
- node-version: [20.x]
15
+ node-version: [23.x]
19
16
 
20
17
  steps:
21
- - uses: actions/checkout@v2
22
- - name: Use Node.js ${{ matrix.node-version }}
23
- uses: actions/setup-node@v1
24
- with:
25
- node-version: ${{ matrix.node-version }}
26
- - run: npm ci
27
- - run: npm test
28
- - run: npm run build
18
+ - uses: actions/checkout@v3
19
+ - name: Use Node.js ${{ matrix.node-version }}
20
+ uses: actions/setup-node@v3
21
+ with:
22
+ node-version: ${{ matrix.node-version }}
23
+ cache: 'npm'
24
+ - run: npm ci
25
+ - run: npm test
26
+ - run: npm run build
27
+ - name: Check for changes
28
+ id: git-check
29
+ run: |
30
+ git diff --quiet README.md changes.svg || echo "has_changes=true" >> $GITHUB_OUTPUT
31
+ - name: Commit updated README and SVG
32
+ if: steps.git-check.outputs.has_changes == 'true'
33
+ run: |
34
+ git config --local user.email "action@github.com"
35
+ git config --local user.name "GitHub Action"
36
+ git add README.md changes.svg
37
+ git commit -m "docs(README): update README.md and changes.svg [skip ci]"
38
+ - name: Push changes
39
+ if: steps.git-check.outputs.has_changes == 'true'
40
+ uses: ad-m/github-push-action@master
41
+ with:
42
+ github_token: ${{ secrets.GITHUB_TOKEN }}
43
+ branch: ${{ github.head_ref }}
@@ -2,13 +2,13 @@ name: Housekeeping
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
5
+ branches: [main]
6
6
  pull_request:
7
- branches: [ master ]
7
+ branches: [main]
8
8
 
9
9
  jobs:
10
10
  linting:
11
- name: "Markdown linting"
11
+ name: 'Markdown linting'
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
14
  - uses: actions/checkout@v2
@@ -16,4 +16,4 @@ jobs:
16
16
  - name: Lint Code Base
17
17
  uses: docker://avtodev/markdown-lint:v1
18
18
  with:
19
- args: "**/*.md"
19
+ args: '**/*.md'
@@ -21,5 +21,5 @@ jobs:
21
21
  - name: Deploy to GitHub Pages 🚀
22
22
  uses: JamesIves/github-pages-deploy-action@v4
23
23
  with:
24
- branch: master
24
+ branch: main
25
25
  folder: '.'
package/.husky/pre-commit CHANGED
@@ -1 +1 @@
1
- npm test && npm run build
1
+ npm test
@@ -0,0 +1,5 @@
1
+ *.xml
2
+ *.min.json
3
+ *.min.js
4
+ *.csv
5
+ *.html
@@ -0,0 +1,7 @@
1
+ {
2
+ "singleQuote": true,
3
+ "trailingComma": "es5",
4
+ "tabWidth": 2,
5
+ "semi": true,
6
+ "printWidth": 100
7
+ }
@@ -13,20 +13,20 @@ or sexual identity and orientation.
13
13
 
14
14
  Examples of behavior that contributes to creating a positive environment include:
15
15
 
16
- * Using welcoming and inclusive language
17
- * Being respectful of differing viewpoints and experiences
18
- * Gracefully accepting constructive criticism
19
- * Focusing on what is best for the community
20
- * Showing empathy towards other community members
16
+ - Using welcoming and inclusive language
17
+ - Being respectful of differing viewpoints and experiences
18
+ - Gracefully accepting constructive criticism
19
+ - Focusing on what is best for the community
20
+ - Showing empathy towards other community members
21
21
 
22
22
  Examples of unacceptable behavior by participants include:
23
23
 
24
- * The use of sexualized language or imagery and unwelcome sexual attention or advances
25
- * Trolling, insulting/derogatory comments, and personal or political attacks
26
- * Public or private harassment
27
- * Publishing others' private information, such as a physical or electronic
24
+ - The use of sexualized language or imagery and unwelcome sexual attention or advances
25
+ - Trolling, insulting/derogatory comments, and personal or political attacks
26
+ - Public or private harassment
27
+ - Publishing others' private information, such as a physical or electronic
28
28
  address, without explicit permission
29
- * Other conduct which could reasonably be considered inappropriate
29
+ - Other conduct which could reasonably be considered inappropriate
30
30
  in a professional setting
31
31
 
32
32
  ## Our Responsibilities
package/README.md CHANGED
@@ -6,16 +6,16 @@
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/__30290__-names-orange.svg)](https://github.com/meodai/color-names/blob/master/src/colornames.csv)
9
+ [![name count](https://img.shields.io/badge/__30291__-names-orange.svg)](https://github.com/meodai/color-names/blob/main/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 __30290__ unique color names from
12
+ A handpicked list of **30290** 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
16
16
  > needle, capable of stitching together our most delicate emotions and memories.
17
17
  > When the needle hits the target, we feel either pleasure or empathy.
18
- > __Kenya Hara – White__
18
+ > **Kenya Hara – White**
19
19
 
20
20
  <p>
21
21
  <a href="#explore-">Explore / Find Names</a>
@@ -49,14 +49,19 @@ shifted the colors a bit when there were identical colors with different names.
49
49
 
50
50
  ## Color Name Submission 💌
51
51
 
52
- __[via form 🌈](https://docs.google.com/forms/d/e/1FAIpQLSfbS5D6owA4dQupJJ-6qhRzuxkjX9r2AliPMg-VR2V3NpGkQg/viewform)
53
- / or [twitter 🐦](https://twitter.com/color_parrot)__
52
+ **[via form 🌈](https://docs.google.com/forms/d/e/1FAIpQLSfbS5D6owA4dQupJJ-6qhRzuxkjX9r2AliPMg-VR2V3NpGkQg/viewform)
53
+ / or [twitter 🐦](https://twitter.com/color_parrot)**
54
54
 
55
55
  Make sure to read the [naming rules](CONTRIBUTING.md) before you contribute!
56
56
 
57
- ## Color Count: __30290__ 🎉
57
+ ### Contributing via Git 🫱🏽‍🫲🏻
58
58
 
59
- ~__0.18%__ of the RGB color space
59
+ If you want to contribute via Git. Edit the `src/colornames.csv` file
60
+ and make sure it builds correctly (`npm run ci && npm run build`).
61
+
62
+ ## Color Count: **30290** 🎉
63
+
64
+ ~**0.18%** of the RGB color space
60
65
 
61
66
  ## [Color distribution](https://codepen.io/meodai/full/zdgXJj/) 🛰
62
67
 
@@ -72,7 +77,7 @@ colors evenly in the color space: [Visualization](https://codepen.io/meodai/full
72
77
 
73
78
  ### Node.js Installation 📦
74
79
 
75
- __Size Warning (1.15 MB)__: If you are doing this in the browser,
80
+ **Size Warning (1.15 MB)**: If you are doing this in the browser,
76
81
  consider using the [public rest API](#api-)
77
82
 
78
83
  ```shell
@@ -129,7 +134,7 @@ has no dependencies [Color-Name-API](https://github.com/meodai/color-name-api)
129
134
 
130
135
  ### Usage JS ⌨
131
136
 
132
- __Size Warning (1.15 MB)__: If you are doing this in the browser,
137
+ **Size Warning (1.15 MB)**: If you are doing this in the browser,
133
138
  consider using the [public rest API](#api-)
134
139
 
135
140
  #### Exact Color
@@ -137,10 +142,10 @@ consider using the [public rest API](#api-)
137
142
  ```javascript
138
143
  import { colornames } from 'color-name-list';
139
144
 
140
- let someColor = colornames.find(color => color.hex === '#ffffff');
145
+ let someColor = colornames.find((color) => color.hex === '#ffffff');
141
146
  console.log(someColor.name); // => white
142
147
 
143
- let someNamedColor = colornames.find(color => color.name === 'Eigengrau')
148
+ let someNamedColor = colornames.find((color) => color.name === 'Eigengrau');
144
149
  console.log(someColor.hex); // => #16161d
145
150
  ```
146
151
 
@@ -162,7 +167,7 @@ const nearest = nearestColor.from(colors);
162
167
  nearest('#f1c1d1'); // => Fairy Tale
163
168
  ```
164
169
 
165
- __Note__: If you are looking for something visually more accurate, you could
170
+ **Note**: If you are looking for something visually more accurate, you could
166
171
  use [DeltaE] or use the above snippet, but using [ciecam02] instead of RGB.
167
172
 
168
173
  [DeltaE]: https://github.com/zschuessler/DeltaE
@@ -190,7 +195,7 @@ repositories {
190
195
  }
191
196
 
192
197
  dependencies {
193
- implementation("me.aroze:color-names:1.0.2")
198
+ implementation("me.aroze:color-names:1.0.4")
194
199
  }
195
200
  ```
196
201
 
@@ -205,7 +210,7 @@ dependencies {
205
210
  <dependency>
206
211
  <groupId>me.aroze</groupId>
207
212
  <artifactId>color-names</artifactId>
208
- <version>1.0.2</version>
213
+ <version>1.0.4</version>
209
214
  </dependency>
210
215
  ```
211
216
 
@@ -326,7 +331,7 @@ NamedColor randomColor = colorNames.GetRandomNamedColor();
326
331
  - [krissymashinsky.com] 300USD
327
332
  - [color.museum] 100CHF
328
333
  - [@tunnckoCore] 50USD
329
- - [Myriam Aerne] 20CHF
334
+ - [Myriam Aerne] 40CHF
330
335
  - [Amin] 15USD
331
336
  - [neverything] 25USD/month
332
337
 
@@ -334,17 +339,17 @@ NamedColor randomColor = colorNames.GetRandomNamedColor();
334
339
 
335
340
  #### One-Time
336
341
 
337
- | Item | Expenditure |
338
- | ----------------------- | ------------- |
339
- | Logo by Metafizzy | 800 |
342
+ | Item | Expenditure |
343
+ | ----------------- | ----------- |
344
+ | Logo by Metafizzy | 800 |
340
345
 
341
346
  #### Periodic
342
347
 
343
- | Item | Expenditure |
344
- | ----------------------- | ------------- |
345
- | Color Name API Server | 264.60/year |
346
- | color.pizza domain name | 36.16/year |
347
- | Cloudflare PRO Plan | 240/year |
348
+ | Item | Expenditure |
349
+ | ----------------------- | ----------- |
350
+ | Color Name API Server | 264.60/year |
351
+ | color.pizza domain name | 36.16/year |
352
+ | Cloudflare PRO Plan | 240/year |
348
353
 
349
354
  ### Color Namers
350
355
 
@@ -384,7 +389,7 @@ so that we can remove them promptly.
384
389
 
385
390
  ## Latest Color Names 🔖
386
391
 
387
- ![New colors](changes.svg "New colors")
392
+ ![New colors](changes.svg 'New colors')
388
393
 
389
394
  <!-----------------------------------------------------------------------------
390
395
  REFERENCE LINKS