color-name-list 11.10.1 → 11.12.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.
Files changed (39) hide show
  1. package/.github/workflows/linting.yml +2 -2
  2. package/.husky/pre-commit +2 -0
  3. package/CODE_OF_CONDUCT.md +1 -1
  4. package/README.md +67 -56
  5. package/changes.svg +3 -3
  6. package/dist/colornames.bestof.csv +7 -0
  7. package/dist/colornames.bestof.esm.js +1 -1
  8. package/dist/colornames.bestof.esm.mjs +1 -1
  9. package/dist/colornames.bestof.html +1 -1
  10. package/dist/colornames.bestof.json +1 -1
  11. package/dist/colornames.bestof.min.json +1 -1
  12. package/dist/colornames.bestof.scss +1 -1
  13. package/dist/colornames.bestof.umd.js +1 -1
  14. package/dist/colornames.bestof.xml +28 -0
  15. package/dist/colornames.bestof.yaml +21 -0
  16. package/dist/colornames.csv +8 -0
  17. package/dist/colornames.esm.js +1 -1
  18. package/dist/colornames.esm.mjs +1 -1
  19. package/dist/colornames.html +1 -1
  20. package/dist/colornames.json +1 -1
  21. package/dist/colornames.min.json +1 -1
  22. package/dist/colornames.scss +1 -1
  23. package/dist/colornames.short.csv +4 -0
  24. package/dist/colornames.short.esm.js +1 -1
  25. package/dist/colornames.short.esm.mjs +1 -1
  26. package/dist/colornames.short.html +1 -1
  27. package/dist/colornames.short.json +1 -1
  28. package/dist/colornames.short.min.json +1 -1
  29. package/dist/colornames.short.scss +1 -1
  30. package/dist/colornames.short.umd.js +1 -1
  31. package/dist/colornames.short.xml +16 -0
  32. package/dist/colornames.short.yaml +12 -0
  33. package/dist/colornames.umd.js +1 -1
  34. package/dist/colornames.xml +32 -0
  35. package/dist/colornames.yaml +24 -0
  36. package/dist/history.json +1 -1
  37. package/package.json +7 -3
  38. package/scripts/sortSrc.js +57 -0
  39. package/src/colornames.csv +8 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "color-name-list",
3
- "version": "11.10.1",
3
+ "version": "11.12.0",
4
4
  "description": "long list of color names",
5
5
  "main": "dist/colornames.json",
6
6
  "browser": "dist/colornames.umd.js",
@@ -28,11 +28,14 @@
28
28
  "test:watch": "vitest",
29
29
  "build": "node scripts/build.js && npm run prettier",
30
30
  "prettier": "prettier --write ./dist/*",
31
- "lint": "eslint ./scripts",
31
+ "lint": "npm run lint:scripts && npm run lint:markdown",
32
+ "lint:scripts": "eslint ./scripts",
33
+ "lint:markdown": "markdownlint-cli2 '**/*.md' '#node_modules'",
32
34
  "semantic-release": "semantic-release",
33
35
  "build-history": "node scripts/tools/history.js > dist/history.json",
34
36
  "history": "node scripts/tools/history.js > dist/history.json",
35
- "prepare": "husky"
37
+ "prepare": "husky",
38
+ "sort-colors": "node scripts/sortSrc.js"
36
39
  },
37
40
  "repository": {
38
41
  "type": "git",
@@ -64,6 +67,7 @@
64
67
  "eslint-plugin-prettier": "^5.2.6",
65
68
  "globals": "^16.0.0",
66
69
  "husky": "^9.1.6",
70
+ "markdownlint-cli2": "^0.17.2",
67
71
  "prettier": "^3.5.3",
68
72
  "seedrandom": "^3.0.5",
69
73
  "semantic-release": "^24.2.0",
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Script to sort the colornames.csv file alphabetically by name
5
+ * This helps maintain order when new colors are added to the list
6
+ */
7
+
8
+ import fs from 'fs';
9
+ import path from 'path';
10
+ import { fileURLToPath } from 'url';
11
+
12
+ // Get the directory name using ES modules approach
13
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
14
+
15
+ // Path to the CSV file
16
+ const csvPath = path.join(__dirname, '..', 'src', 'colornames.csv');
17
+
18
+ // Read the CSV file
19
+ const readAndSortCSV = () => {
20
+ try {
21
+ // Read the file
22
+ const data = fs.readFileSync(csvPath, 'utf8');
23
+
24
+ // Split the data into lines
25
+ const lines = data.trim().split('\n');
26
+
27
+ // The header should be kept as the first line
28
+ const header = lines[0];
29
+
30
+ // Remove the header from the array of lines
31
+ const colorLines = lines.slice(1);
32
+
33
+ // Sort the color lines alphabetically by name (case-insensitive)
34
+ const sortedColorLines = colorLines.sort((a, b) => {
35
+ // Extract the name from each line (first column before the comma)
36
+ const nameA = a.split(',')[0].toLowerCase();
37
+ const nameB = b.split(',')[0].toLowerCase();
38
+ return nameA.localeCompare(nameB);
39
+ });
40
+
41
+ // Combine the header and sorted lines
42
+ const sortedData = [header, ...sortedColorLines].join('\n');
43
+
44
+ // Write the sorted data back to the file
45
+ fs.writeFileSync(csvPath, sortedData, 'utf8');
46
+
47
+ console.log(`✅ Successfully sorted ${sortedColorLines.length} colors alphabetically by name`);
48
+ console.log(`📝 File saved: ${csvPath}`);
49
+
50
+ } catch (error) {
51
+ console.error('❌ Error sorting the CSV file:', error);
52
+ process.exit(1);
53
+ }
54
+ };
55
+
56
+ // Execute the function
57
+ readAndSortCSV();
@@ -6921,6 +6921,7 @@ Cucumber Crush,#a2ac86,
6921
6921
  Cucumber Green,#466353,
6922
6922
  Cucumber Ice,#cdd79d,
6923
6923
  Cucumber Milk,#c2f177,x
6924
+ Cucumber Queen,#3c773c,x
6924
6925
  Cucuzza Verde,#9ba373,
6925
6926
  Cuddle,#bccae8,
6926
6927
  Cuddlepot,#ad8068,
@@ -12427,6 +12428,7 @@ Heidelberg Red,#960117,
12427
12428
  Heifer,#c3bdb1,
12428
12429
  Heirloom,#b67b71,
12429
12430
  Heirloom Apricot,#f4bea6,
12431
+ Heirloom Blush,#e3664c,x
12430
12432
  Heirloom Hydrangea,#327ccb,
12431
12433
  Heirloom Lace,#f5e6d6,
12432
12434
  Heirloom Lilac,#9d96b2,
@@ -14661,6 +14663,7 @@ Leaf Yellow,#e9d79e,
14661
14663
  Leaflet,#8b987b,
14662
14664
  Leafy,#679b6a,x
14663
14665
  Leafy Canopy,#aacc11,x
14666
+ Leafy Greens,#80bb66,x
14664
14667
  Leafy Lemon,#c0f000,x
14665
14668
  Leafy Lichen,#7d8574,
14666
14669
  Leafy Lush,#08690e,x
@@ -16766,6 +16769,7 @@ Middlestone,#c7ab84,
16766
16769
  Middy’s Purple,#aa8ed6,
16767
16770
  Midnight,#03012d,x
16768
16771
  Midnight Affair,#534657,
16772
+ Midnight Aubergine,#853c69,x
16769
16773
  Midnight Badger,#585960,
16770
16774
  Midnight Blue,#020035,
16771
16775
  Midnight Blush,#979fbf,
@@ -17445,6 +17449,7 @@ Morro Bay,#546b78,
17445
17449
  Morrow White,#fcfccf,
17446
17450
  Mortar,#565051,
17447
17451
  Mortar Grey,#9e9f9e,
17452
+ MoS₂ Cyan,#00e6d3,
17448
17453
  Mosaic Blue,#007c94,
17449
17454
  Mosaic Green,#599f68,
17450
17455
  Mosaic Tile,#1c6b69,
@@ -24124,6 +24129,7 @@ Shale Grey,#899da3,
24124
24129
  Shalimar,#f8f6a8,
24125
24130
  Shallot Bulb,#7b8d73,
24126
24131
  Shallot Leaf,#505c3a,
24132
+ Shallot Peel,#eec378,x
24127
24133
  Shallow End,#c5f5e8,
24128
24134
  Shallow Sea,#9ab8c2,x
24129
24135
  Shallow Shoal,#9dd6d4,
@@ -27400,6 +27406,7 @@ Toasted Cashew,#e2d0b8,
27400
27406
  Toasted Chestnut,#a7775b,
27401
27407
  Toasted Coconut,#e9c2a1,
27402
27408
  Toasted Grain,#c5a986,
27409
+ Toasted Husk,#ed8a53,x
27403
27410
  Toasted Marshmallow,#efe0d4,
27404
27411
  Toasted Marshmallow Fluff,#fff9eb,x
27405
27412
  Toasted Nut,#c08768,
@@ -27911,6 +27918,7 @@ Turner’s Yellow,#e6c26f,
27911
27918
  Turning Leaf,#ced9c3,
27912
27919
  Turning Oakleaf,#ede1a8,
27913
27920
  Turnip Boy,#efc6a1,
27921
+ Turnip Crown,#bb9ecd,x
27914
27922
  Turnip the Pink,#e5717b,x
27915
27923
  Turnstone,#d3cfbf,
27916
27924
  Turquesa,#448899,