color-name-list 11.9.1 → 11.10.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.
Files changed (38) hide show
  1. package/.github/workflows/build-and-release.yml +57 -0
  2. package/.github/workflows/build.yml +22 -7
  3. package/.husky/pre-commit +1 -1
  4. package/README.md +14 -9
  5. package/changes.svg +3 -3
  6. package/dist/colornames.bestof.csv +4532 -4532
  7. package/dist/colornames.bestof.esm.js +1 -4535
  8. package/dist/colornames.bestof.esm.mjs +1 -4535
  9. package/dist/colornames.bestof.json +1 -4535
  10. package/dist/colornames.bestof.scss +1 -4535
  11. package/dist/colornames.bestof.umd.js +1 -4543
  12. package/dist/colornames.bestof.yaml +9067 -4534
  13. package/dist/colornames.csv +30290 -30289
  14. package/dist/colornames.esm.js +1 -30292
  15. package/dist/colornames.esm.mjs +1 -30292
  16. package/dist/colornames.html +1 -1
  17. package/dist/colornames.json +1 -30292
  18. package/dist/colornames.min.json +1 -1
  19. package/dist/colornames.scss +1 -30292
  20. package/dist/colornames.short.csv +2885 -2885
  21. package/dist/colornames.short.esm.js +1 -2888
  22. package/dist/colornames.short.esm.mjs +1 -2888
  23. package/dist/colornames.short.json +1 -2888
  24. package/dist/colornames.short.scss +1 -2888
  25. package/dist/colornames.short.umd.js +1 -2896
  26. package/dist/colornames.short.yaml +5773 -2887
  27. package/dist/colornames.umd.js +1 -30300
  28. package/dist/colornames.xml +4 -0
  29. package/dist/colornames.yaml +60584 -30291
  30. package/dist/history.json +1 -61120
  31. package/package.json +7 -5
  32. package/scripts/build.js +67 -15
  33. package/scripts/tools/history.js +6 -1
  34. package/src/colornames.csv +1 -0
  35. package/tests/formats.test.js +46 -0
  36. package/tests/imports.test.js +119 -0
  37. package/vitest.config.js +8 -0
  38. package/.github/workflows/release.yml +0 -26
@@ -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,11 +1,8 @@
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: [main]
9
6
  pull_request:
10
7
  branches: [main]
11
8
 
@@ -18,11 +15,29 @@ jobs:
18
15
  node-version: [23.x]
19
16
 
20
17
  steps:
21
- - uses: actions/checkout@v2
18
+ - uses: actions/checkout@v3
22
19
  - name: Use Node.js ${{ matrix.node-version }}
23
- uses: actions/setup-node@v1
20
+ uses: actions/setup-node@v3
24
21
  with:
25
22
  node-version: ${{ matrix.node-version }}
23
+ cache: 'npm'
26
24
  - run: npm ci
27
25
  - run: npm test
28
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 }}
package/.husky/pre-commit CHANGED
@@ -1 +1 @@
1
- npm test && npm run build
1
+ npm 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/__30290__-names-orange.svg)](https://github.com/meodai/color-names/blob/main/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 __30291__ 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
@@ -54,9 +54,14 @@ shifted the colors a bit when there were identical colors with different names.
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: __30291__ 🎉
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
@@ -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
 
package/changes.svg CHANGED
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 850">
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="850"/>
13
- <text x="40" y="90" fill="#3e1825">Black-Hearted</text><text x="40" y="160" fill="#2539bf">Blue Murder</text><text x="40" y="230" fill="#005f7a">Blue-Collar</text><text x="40" y="300" fill="#4a290d">Brown Study</text><text x="40" y="370" fill="#79512c">Brown-Noser</text><text x="40" y="440" fill="#c49b35">Golden Mean</text><text x="40" y="510" fill="#346e23">Green-Eyed Monster</text><text x="40" y="580" fill="#5c2e88">Purple Patch</text><text x="40" y="650" fill="#c92b1e">Red Mist</text><text x="40" y="720" fill="#dedbde">White-Collar</text><text x="40" y="790" fill="#e6e382">Yellow Press</text>
12
+ <rect fill="#212121" x="0" y="0" width="600" height="150"/>
13
+ <text x="40" y="90" fill="#fff1fa">Pinkish White</text>
14
14
  </svg>