color-name-list 10.23.0 → 10.24.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "color-name-list",
3
- "version": "10.23.0",
3
+ "version": "10.24.1",
4
4
  "description": "long list of color names",
5
5
  "main": "dist/colornames.json",
6
6
  "browser": "dist/colornames.umd.js",
package/scripts/build.js CHANGED
@@ -71,14 +71,22 @@ colorsSrc.values['name'].forEach((name) => {
71
71
  });
72
72
 
73
73
  // loop good name markers
74
- colorsSrc.values['good name'].forEach((str) => {
74
+ colorsSrc.values[bestOfKey].forEach((str) => {
75
75
  // check for spaces
76
76
  if (spacesValidation.test(str)) {
77
- log('"good name" marker', str, `${str} found either a leading or trailing space (or both)`);
77
+ log(
78
+ `"${bestOfKey}" marker'`,
79
+ str,
80
+ `${str} found either a leading or trailing space (or both)`
81
+ );
78
82
  }
79
83
 
80
- if (!(str == 'x' || str == '')) {
81
- log('"good name" marker', str, `${str} must be a lowercase "x" character or empty`);
84
+ if (!(str == "x" || str == "")) {
85
+ log(
86
+ `"${bestOfKey}" marker`,
87
+ str,
88
+ `${str} must be a lowercase "x" character or empty`
89
+ );
82
90
  }
83
91
  });
84
92
 
@@ -101,7 +109,7 @@ const JSONExportString = JSON.stringify(
101
109
 
102
110
  const JSONExportStringBestOf = JSON.stringify(
103
111
  [...colorsSrc.entires].filter(
104
- (val) => (val['good name'])
112
+ (val) => (val[bestOfKey])
105
113
  ).map( // removes good name attributes
106
114
  (val) => ({
107
115
  name: val.name,
@@ -127,7 +135,7 @@ const miniJSONExportObj = colorsSrc.entires.reduce((obj, entry) => {
127
135
  }, {});
128
136
 
129
137
  const miniJSONExportObjBestOf = colorsSrc.entires.reduce((obj, entry) => {
130
- if(entry['good name']) {
138
+ if(entry[bestOfKey]) {
131
139
  obj[entry.hex.replace('#', '')] = entry.name;
132
140
  }
133
141
  return obj;
@@ -242,7 +250,7 @@ for (const outputFormat in outputFormats) {
242
250
  for (const outputFormat in outputFormats) {
243
251
  if (outputFormats[outputFormat]) {
244
252
  let outputString = objArrToString(
245
- colorsSrc.entires.filter((val) => (val['good name'])),
253
+ colorsSrc.entires.filter((val) => (val[bestOfKey])),
246
254
  csvKeys,
247
255
  outputFormats[outputFormat]
248
256
  );
@@ -3,7 +3,7 @@
3
3
  # getImageColors 'https://upload.wikimedia.org/wikipedia/commons/a/a1/AmstradCPC_palette.png' cpc 32
4
4
  # creates a cpc.txt with 32 colors from the download picture
5
5
 
6
- # ! uses gawk (berw install gawk) & imagemagick (brew install imagemagick)
6
+ # ! uses gawk (brew install gawk) & imagemagick (brew install imagemagick)
7
7
 
8
8
  curl "$1" > "$2.png" &&
9
9
  convert "$2.png" -colors $3 -depth 8 -format '%c' histogram:info:- \
@@ -7,37 +7,41 @@ function cmd(c) {
7
7
  }
8
8
 
9
9
  // Print the list of colors added/removed/changed by date.
10
- // Pretty inefficient due to the many git commands (optimized for clarity)
11
10
  async function main() {
12
-
13
11
  // Grab the list of all git commits
14
- const allCommits = cmd("git log --pretty=format:%h").split("\n").filter(Boolean);
12
+ const allCommits = cmd("git log --pretty=format:%h")
13
+ .split("\n")
14
+ .filter(Boolean);
15
15
 
16
16
  // The data, one element for each commit (date)
17
17
  const dat = [];
18
18
 
19
19
  for (const commit of allCommits) {
20
-
21
20
  // Figure out what changed in that particular commit
22
21
  const diff = cmd(`git show ${commit} -- ./src/colornames.csv`)
23
- .split("\n").filter(Boolean);
22
+ .split("\n")
23
+ .filter(Boolean);
24
24
 
25
25
  // Grab the date for said commit
26
26
  const dt = cmd(`git show -s ${commit} --format=%ci`);
27
27
 
28
- // The list of color modified (indexed by hex value) with "op" (+/-/~)
28
+ // The list of colors modified (indexed by hex value) with "op" (+/-/~)
29
29
  const modified = {};
30
30
 
31
- for(const line of diff) {
32
- const res = line.match(/^((?<op>(\+|-)))(?<name>[^,]+),(?<hex>[^,]+)/)
33
- if(!res) { continue; }
31
+ for (const line of diff) {
32
+ const res = line.match(/^((?<op>(\+|-)))(?<name>[^,]+),(?<hex>[^,]+)/);
33
+ if (!res) {
34
+ continue;
35
+ }
34
36
  const name = res.groups?.name;
35
- const hex = res.groups?.hex;
37
+ const hex = res.groups?.hex?.trim(); // Remove any \r or whitespace
36
38
  var op = res.groups?.op;
37
39
 
38
40
  // If a value already introduced with a different op, then it's
39
41
  // a modification
40
- if(modified[hex] && modified[hex].op !== op) { op = "~" }
42
+ if (modified[hex] && modified[hex].op !== op) {
43
+ op = "~";
44
+ }
41
45
 
42
46
  modified[hex] = { hex, name, op };
43
47
  }
@@ -45,22 +49,24 @@ async function main() {
45
49
  // Partition by added/removed/changed
46
50
 
47
51
  const added = Object.values(modified)
48
- .filter(x => x.op === "+")
49
- .map(({name, hex}) => ({ name, hex }));
52
+ .filter((x) => x.op === "+")
53
+ .map(({ name, hex }) => ({ name, hex }));
50
54
 
51
55
  const removed = Object.values(modified)
52
- .filter(x => x.op === "-")
53
- .map(({name, hex}) => ({ name, hex }));
56
+ .filter((x) => x.op === "-")
57
+ .map(({ name, hex }) => ({ name, hex }));
54
58
 
55
59
  const changed = Object.values(modified)
56
- .filter(x => x.op === "~")
57
- .map(({name, hex}) => ({ name, hex }));
60
+ .filter((x) => x.op === "~")
61
+ .map(({ name, hex }) => ({ name, hex }));
58
62
 
59
- // Add the day
60
- dat.push({ date: dt, added, removed, changed });
63
+ // Add the day only if there were changes
64
+ if (added.length > 0 || removed.length > 0 || changed.length > 0) {
65
+ dat.push({ date: dt, added, removed, changed });
66
+ }
61
67
  }
62
68
 
63
69
  console.log(JSON.stringify(dat));
64
70
  }
65
71
 
66
- main()
72
+ main();
@@ -306,7 +306,6 @@ Alabaster,#f3e7db,
306
306
  Alabaster Beauty,#e9e3d2,
307
307
  Alabaster Gleam,#f0debd,
308
308
  Alabaster White,#dfd4bf,
309
- Aladdin’s Feather,#5500ff,
310
309
  Alaea,#81585b,
311
310
  Alaitoc Blue,#8e8c97,
312
311
  Alajuela Toad,#ffae52,
@@ -475,6 +474,7 @@ Alpha Gold,#ae8e5f,
475
474
  Alpha Male,#715a45,
476
475
  Alpha Tango,#628fb0,
477
476
  Alphabet Blue,#abcdef,
477
+ Alphabet Soup,#fedcba,
478
478
  Alpine,#ad8a3b,
479
479
  Alpine Air,#a9b4a9,
480
480
  Alpine Alabaster,#badbe6,
@@ -1341,6 +1341,7 @@ Asian Fusion,#ece0cd,
1341
1341
  Asian Ivory,#e8e0cd,
1342
1342
  Asian Jute,#d4b78f,
1343
1343
  Asian Pear,#ae9156,
1344
+ Asian Spice,#118822,x
1344
1345
  Asian Violet,#8b818c,
1345
1346
  Āsmānī Sky,#88ddbb,
1346
1347
  Aspara,#70b2cc,
@@ -1493,6 +1494,7 @@ Aurora Orange,#ec7042,
1493
1494
  Aurora Pink,#e881a6,
1494
1495
  Aurora Red,#c13435,
1495
1496
  Aurora Splendor,#595682,
1497
+ Aurora Teal,#72b2af,
1496
1498
  Austere,#726848,
1497
1499
  Austere Grey,#bebfb2,
1498
1500
  Australian Apricot,#f4c4a5,
@@ -10109,6 +10111,7 @@ Frangipane,#f4d5b2,
10109
10111
  Frangipani,#ffd7a0,
10110
10112
  Frank Blue,#225288,
10111
10113
  Frank Lloyd White,#efebdb,
10114
+ Franken Berry,#e5989c,
10112
10115
  Frankenstein,#7ba05b,x
10113
10116
  Frankly Earnest,#e2dbca,
10114
10117
  Frappé,#ceae99,x
@@ -12059,14 +12062,6 @@ Gyoza Dumpling,#dfb46f,
12059
12062
  Gypsum,#eeede4,
12060
12063
  Gypsum Rose,#e2c4af,
12061
12064
  Gypsum Sand,#d6cfbf,
12062
- Gypsy,#e59368,
12063
- Gypsy Canvas,#b7a467,
12064
- Gypsy Caravan,#d1c8d7,
12065
- Gypsy Dancer,#c07c7b,x
12066
- Gypsy Jewels,#613a57,
12067
- Gypsy Magic,#917d82,
12068
- Gypsy Red,#b6363b,
12069
- Gypsy’s Gown,#a698a8,
12070
12065
  H₂O,#bfe1e6,x
12071
12066
  Habañero,#f98513,x
12072
12067
  Habañero Chile,#b8473d,
@@ -12324,7 +12319,6 @@ Healing Plant,#6c7d42,
12324
12319
  Healing Retreat,#bac2aa,
12325
12320
  Healing Springs,#e1e2c2,
12326
12321
  Heart Chakra,#5bbd7f,
12327
- Heart Gold,#808000,
12328
12322
  Heart of Gold,#9d7f4c,
12329
12323
  Heart of Ice,#f7fcff,x
12330
12324
  Heart of Palm,#d2cfa6,
@@ -13977,7 +13971,6 @@ Kabul,#6c5e53,x
13977
13971
  Kacey’s Pink,#e94b7e,
13978
13972
  Kachi Indigo,#393e4f,
13979
13973
  Kaffee,#816d5a,
13980
- Kaffir Lime,#b9ab85,
13981
13974
  Kahili,#b7bfb0,
13982
13975
  Kahlua Milk,#bab099,
13983
13976
  Kahu Blue,#0093d6,
@@ -15000,7 +14993,6 @@ Light Mosque,#d8cdd0,
15000
14993
  Light Mulberry,#d1cae1,
15001
14994
  Light My Fire,#f8611a,x
15002
14995
  Light Mystified,#d6e4d4,
15003
- Light Naked Pink,#e2d4e1,
15004
14996
  Light Nougat,#fbe6c7,
15005
14997
  Light Nursery,#f4dcdc,
15006
14998
  Light Nut Milk,#e3d8d4,
@@ -15012,7 +15004,6 @@ Light Opale,#c1e8ea,
15012
15004
  Light Opus,#dad7e8,
15013
15005
  Light Orchid,#e6a8d7,
15014
15006
  Light Orchid Haze,#d6cdd0,
15015
- Light Oriental Blush,#e1d4e8,
15016
15007
  Light Otto Ice,#cde7dd,
15017
15008
  Light Pale Icelandish,#ccdfdc,
15018
15009
  Light Pale Lilac,#ced5e4,
@@ -15990,6 +15981,7 @@ Make-Up Blue,#335f8d,
15990
15981
  Makin it Rain,#88bb55,x
15991
15982
  Mako,#505555,
15992
15983
  Makore Veneer Red,#6e2f2c,
15984
+ Makrut Lime,#688c43,
15993
15985
  Malabar,#cfbea9,
15994
15986
  Malachite,#0bda51,
15995
15987
  Malachite Blue Turquoise,#0e4f4f,
@@ -17765,6 +17757,7 @@ Mystic Magenta,#e02e82,x
17765
17757
  Mystic Maroon,#ad4379,
17766
17758
  Mystic Mauve,#dbb7ba,
17767
17759
  Mystic Melon,#edebb4,
17760
+ Mystic Nights,#4b2c74,x
17768
17761
  Mystic Opal,#fbddbe,
17769
17762
  Mystic Pool,#d5dde2,
17770
17763
  Mystic Red,#ff5500,
@@ -17805,10 +17798,7 @@ Nail Polish Pink,#bd4e84,
17805
17798
  Nairobi Dusk,#d9a787,
17806
17799
  Naive Peach,#fce7d3,
17807
17800
  Nakabeni Pink,#c93756,
17808
- Naked Lady,#d6b3a9,
17809
- Naked Light,#e9b6c1,
17810
17801
  Naked Noodle,#f7cb6e,x
17811
- Naked Pink,#d8c6d6,
17812
17802
  Naked Rose,#ebb5b3,
17813
17803
  Namakabe Brown,#785e49,
17814
17804
  Namara Grey,#7b7c7d,
@@ -18358,7 +18348,6 @@ Nuclear Mango,#ee9933,x
18358
18348
  Nuclear Meltdown,#44ee00,x
18359
18349
  Nuclear Throne,#00de00,x
18360
18350
  Nuclear Waste,#7cfc00,
18361
- Nude,#f2d3bc,
18362
18351
  Nude Flamingo,#e58f7c,x
18363
18352
  Nude Lips,#b5948d,x
18364
18353
  Nugget,#bc9229,x
@@ -18957,22 +18946,6 @@ Organza,#ffdea6,
18957
18946
  Organza Green,#bbccbd,
18958
18947
  Organza Peach,#fbeeda,
18959
18948
  Organza Violet,#7391cc,
18960
- Orient,#255b77,
18961
- Orient Blue,#4e4981,
18962
- Orient Green,#77997d,
18963
- Orient Mosaic Green,#7cb8a1,
18964
- Orient Pink,#8f415f,
18965
- Orient Yellow,#f7b969,
18966
- Oriental Blush,#d7c6e1,x
18967
- Oriental Eggplant,#533e4f,
18968
- Oriental Herbs,#118822,x
18969
- Oriental Nights,#4b2c74,x
18970
- Oriental Olive,#445533,x
18971
- Oriental Pink,#c28e88,x
18972
- Oriental Ruby,#ce536b,x
18973
- Oriental Scent,#e2bfa8,x
18974
- Oriental Silk,#efe5d6,x
18975
- Oriental Spice,#8b5131,x
18976
18949
  Origami,#ece0c6,
18977
18950
  Origami White,#e5e2da,
18978
18951
  Original White,#f0e5d3,
@@ -19397,9 +19370,8 @@ Paper Moon,#ead4a6,
19397
19370
  Paper Plane,#f1ece0,x
19398
19371
  Paper Sack,#b4a07a,
19399
19372
  Paper Tiger,#fdf1af,
19400
- Paper White,#eef0f3,x
19373
+ Paper White,#f6efdf,x
19401
19374
  Paperboy’s Lawn,#249148,
19402
- Paperwhite,#f6efdf,x
19403
19375
  Papier Blanc,#efeadc,
19404
19376
  Papilio Argeotus,#8590ae,
19405
19377
  Pappardelle Noodle,#f9ebcc,
@@ -19795,7 +19767,6 @@ Pearly Putty,#dbd3bd,
19795
19767
  Pearly Star,#e4e4da,
19796
19768
  Pearly Swirly,#eee9d8,
19797
19769
  Pearly White,#feefd3,
19798
- Peas in a Pod,#7b9459,
19799
19770
  Peas Please,#8c7f3c,x
19800
19771
  Peaslake,#8caa95,
19801
19772
  Peat,#766d52,
@@ -21102,6 +21073,7 @@ Precious Copper,#885522,x
21102
21073
  Precious Dewdrop,#f5f5e4,
21103
21074
  Precious Emerald,#186e50,
21104
21075
  Precious Garnet,#b7757c,
21076
+ Precious Jewels,#613a57,
21105
21077
  Precious Nectar,#ffde9c,
21106
21078
  Precious Oxley,#6d9a79,
21107
21079
  Precious Pearls,#f1f0ef,
@@ -21706,6 +21678,7 @@ Radar,#b6c8e4,
21706
21678
  Radar Blip Green,#96f97b,
21707
21679
  Radiance,#bb9157,
21708
21680
  Radiant Dawn,#ece2ce,
21681
+ Radiant Feather,#5500ff,
21709
21682
  Radiant Foliage,#659c35,x
21710
21683
  Radiant Glow,#ffeed2,
21711
21684
  Radiant Hulk,#10f144,x
@@ -24252,6 +24225,7 @@ Shishi Pink,#efab93,
24252
24225
  Shishito Pepper Green,#bbf90f,
24253
24226
  Shiso Green,#63a950,
24254
24227
  Shiva Blue,#99dbfe,
24228
+ Shivering Green,#24dd7e,x
24255
24229
  Shock Jockey,#bb88aa,
24256
24230
  Shocking,#e899be,
24257
24231
  Shocking Crimson,#ff0d04,x
@@ -25409,7 +25383,6 @@ Spiced Up Orange,#e67a37,x
25409
25383
  Spiced Vinegar,#cdba99,
25410
25384
  Spiced Wine,#664942,
25411
25385
  Spicy,#ff1111,
25412
- Spicy and Oriental,#c75f26,
25413
25386
  Spicy Berry,#cc3366,x
25414
25387
  Spicy Cayenne,#9b5b4f,
25415
25388
  Spicy Cinnamon,#a85624,x
@@ -27979,6 +27952,7 @@ Twisted Tail,#9a845e,
27979
27952
  Twisted Time,#7f6c6e,
27980
27953
  Twisted Vine,#655f50,
27981
27954
  Two Harbours,#bed3e1,
27955
+ Two Peas in a Pod,#a5ca4f,x
27982
27956
  Typewriter Ink,#4c5053,
27983
27957
  Typhus Corrosion,#463d2b,
27984
27958
  Tyrant Skull,#cdc586,
@@ -29462,7 +29436,6 @@ Wild Maple,#ffe2c7,
29462
29436
  Wild Mulberry,#a96388,
29463
29437
  Wild Mushroom,#84704b,
29464
29438
  Wild Mustang,#695649,
29465
- Wild Nude,#beae8a,
29466
29439
  Wild Oats,#ecdbc3,
29467
29440
  Wild Olive,#9c8042,
29468
29441
  Wild Orchid,#d979a2,
@@ -30181,6 +30154,7 @@ Zen,#cfd9de,x
30181
30154
  Zen Blue,#99a4ba,
30182
30155
  Zen Essence,#c6bfa7,
30183
30156
  Zen Garden,#d1dac0,x
30157
+ Zen Garden Olive,#445533,x
30184
30158
  Zen Retreat,#5b5d5c,
30185
30159
  Zenith,#497a9f,x
30186
30160
  Zenith Heights,#a6c8c7,