color-name-list 11.2.0 → 11.4.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/README.md +3 -3
- package/changes.svg +3 -3
- package/dist/colornames.csv +16 -0
- package/dist/colornames.esm.js +1 -1
- package/dist/colornames.esm.mjs +1 -1
- package/dist/colornames.html +1 -1
- package/dist/colornames.json +1 -1
- package/dist/colornames.min.json +1 -1
- package/dist/colornames.scss +1 -1
- package/dist/colornames.umd.js +1 -1
- package/dist/colornames.xml +64 -0
- package/dist/colornames.yaml +48 -0
- package/dist/history.json +1 -1
- package/package.json +1 -1
- package/scripts/build.js +15 -15
- package/scripts/lib.js +2 -2
- package/src/colornames.csv +16 -0
package/package.json
CHANGED
package/scripts/build.js
CHANGED
|
@@ -41,7 +41,7 @@ const src = fs.readFileSync(
|
|
|
41
41
|
const colorsSrc = parseCSVString(src);
|
|
42
42
|
|
|
43
43
|
// sort by sorting criteria
|
|
44
|
-
colorsSrc.
|
|
44
|
+
colorsSrc.entries.sort((a, b) => {
|
|
45
45
|
return a[sortBy].localeCompare(b[sortBy]);
|
|
46
46
|
});
|
|
47
47
|
|
|
@@ -101,7 +101,7 @@ if (isTestRun) {
|
|
|
101
101
|
|
|
102
102
|
// creates JS related files
|
|
103
103
|
const JSONExportString = JSON.stringify(
|
|
104
|
-
[...colorsSrc.
|
|
104
|
+
[...colorsSrc.entries].map( // removes good name attributes
|
|
105
105
|
(val) => ({
|
|
106
106
|
name: val.name,
|
|
107
107
|
hex: val.hex,
|
|
@@ -110,7 +110,7 @@ const JSONExportString = JSON.stringify(
|
|
|
110
110
|
);
|
|
111
111
|
|
|
112
112
|
const JSONExportStringBestOf = JSON.stringify(
|
|
113
|
-
[...colorsSrc.
|
|
113
|
+
[...colorsSrc.entries].filter(
|
|
114
114
|
(val) => (val[bestOfKey])
|
|
115
115
|
).map( // removes good name attributes
|
|
116
116
|
(val) => ({
|
|
@@ -121,7 +121,7 @@ const JSONExportStringBestOf = JSON.stringify(
|
|
|
121
121
|
);
|
|
122
122
|
|
|
123
123
|
const JSONExportStringShort = JSON.stringify(
|
|
124
|
-
[...colorsSrc.
|
|
124
|
+
[...colorsSrc.entries]
|
|
125
125
|
.filter(
|
|
126
126
|
// make sure its only one word long
|
|
127
127
|
(val) =>
|
|
@@ -154,19 +154,19 @@ fs.writeFileSync(
|
|
|
154
154
|
);
|
|
155
155
|
|
|
156
156
|
// creates a more compact JSON file, where the HEX color serves as an id
|
|
157
|
-
const miniJSONExportObj = colorsSrc.
|
|
157
|
+
const miniJSONExportObj = colorsSrc.entries.reduce((obj, entry) => {
|
|
158
158
|
obj[entry.hex.replace('#', '')] = entry.name;
|
|
159
159
|
return obj;
|
|
160
160
|
}, {});
|
|
161
161
|
|
|
162
|
-
const miniJSONExportObjBestOf = colorsSrc.
|
|
162
|
+
const miniJSONExportObjBestOf = colorsSrc.entries.reduce((obj, entry) => {
|
|
163
163
|
if(entry[bestOfKey]) {
|
|
164
164
|
obj[entry.hex.replace('#', '')] = entry.name;
|
|
165
165
|
}
|
|
166
166
|
return obj;
|
|
167
167
|
}, {});
|
|
168
168
|
|
|
169
|
-
const miniJSONExportObjShort = colorsSrc.
|
|
169
|
+
const miniJSONExportObjShort = colorsSrc.entries.reduce((obj, entry) => {
|
|
170
170
|
if (
|
|
171
171
|
entry[bestOfKey] &&
|
|
172
172
|
//entry.name.split(" ").length === 1 &&
|
|
@@ -287,7 +287,7 @@ const outputFormats = {
|
|
|
287
287
|
for (const outputFormat in outputFormats) {
|
|
288
288
|
if (outputFormats[outputFormat]) {
|
|
289
289
|
let outputString = objArrToString(
|
|
290
|
-
colorsSrc.
|
|
290
|
+
colorsSrc.entries,
|
|
291
291
|
csvKeys,
|
|
292
292
|
outputFormats[outputFormat]
|
|
293
293
|
);
|
|
@@ -305,7 +305,7 @@ for (const outputFormat in outputFormats) {
|
|
|
305
305
|
for (const outputFormat in outputFormats) {
|
|
306
306
|
if (outputFormats[outputFormat]) {
|
|
307
307
|
let outputString = objArrToString(
|
|
308
|
-
colorsSrc.
|
|
308
|
+
colorsSrc.entries.filter((val) => (val[bestOfKey])),
|
|
309
309
|
csvKeys,
|
|
310
310
|
outputFormats[outputFormat]
|
|
311
311
|
);
|
|
@@ -323,7 +323,7 @@ for (const outputFormat in outputFormats) {
|
|
|
323
323
|
for (const outputFormat in outputFormats) {
|
|
324
324
|
if (outputFormats[outputFormat]) {
|
|
325
325
|
let outputString = objArrToString(
|
|
326
|
-
colorsSrc.
|
|
326
|
+
colorsSrc.entries.filter(
|
|
327
327
|
(val) =>
|
|
328
328
|
val[bestOfKey] &&
|
|
329
329
|
//val.name.split(" ").length === 1 &&
|
|
@@ -352,15 +352,15 @@ fs.writeFileSync(
|
|
|
352
352
|
readme.replace(
|
|
353
353
|
// update color count in text
|
|
354
354
|
/__\d+__/g,
|
|
355
|
-
`__${colorsSrc.
|
|
355
|
+
`__${colorsSrc.entries.length}__`
|
|
356
356
|
).replace(
|
|
357
357
|
// update color count in badge
|
|
358
358
|
/\d+-colors-orange/,
|
|
359
|
-
`${colorsSrc.
|
|
359
|
+
`${colorsSrc.entries.length}-colors-orange`
|
|
360
360
|
).replace(
|
|
361
361
|
// update color count in percentage
|
|
362
362
|
/__\d+(\.\d+)?%__/,
|
|
363
|
-
`__${((colorsSrc.
|
|
363
|
+
`__${((colorsSrc.entries.length / (256 * 256 * 256)) * 100).toFixed(2)}%__`
|
|
364
364
|
).replace(
|
|
365
365
|
// update file size
|
|
366
366
|
/\d+(\.\d+)? MB\)__/g,
|
|
@@ -399,7 +399,7 @@ function showLog() {
|
|
|
399
399
|
function log(key, value, message, errorLevel = 1) {
|
|
400
400
|
const error = {};
|
|
401
401
|
// looks for the original item that caused the error
|
|
402
|
-
error.entries = colorsSrc.
|
|
402
|
+
error.entries = colorsSrc.entries.filter((entry) => {
|
|
403
403
|
return entry[key] === value;
|
|
404
404
|
});
|
|
405
405
|
|
|
@@ -418,7 +418,7 @@ const svgTpl = fs.readFileSync(
|
|
|
418
418
|
// generates an SVG image with the new color based on the diff ot the last commit to the current
|
|
419
419
|
function diffSVG() {
|
|
420
420
|
exec(
|
|
421
|
-
`git diff -U0 HEAD ${baseFolder}${folderDist}${fileNameSrc}.csv
|
|
421
|
+
`git diff -U0 HEAD ${baseFolder}${folderDist}${fileNameSrc}.csv`,
|
|
422
422
|
function (err, stdout, stderr) {
|
|
423
423
|
const diffTxt = stdout;
|
|
424
424
|
if (!/(?<=^[\+])[^\+].*/gm.test(diffTxt)) return;
|
package/scripts/lib.js
CHANGED
|
@@ -27,7 +27,7 @@ export const parseCSVString = (
|
|
|
27
27
|
values[header] = [];
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const entries = rows.map((row) => {
|
|
31
31
|
// decomposes each row into its single entries
|
|
32
32
|
const rowArr = row.split(csvDelimitor);
|
|
33
33
|
|
|
@@ -46,7 +46,7 @@ export const parseCSVString = (
|
|
|
46
46
|
return entry;
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
return {headers,
|
|
49
|
+
return {headers, entries, values};
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
/**
|
package/src/colornames.csv
CHANGED
|
@@ -1413,6 +1413,7 @@ Athens,#3f74b1,
|
|
|
1413
1413
|
Athens Grey,#dcdddd,
|
|
1414
1414
|
Athonian Camoshade,#6d8e44,
|
|
1415
1415
|
Aths Special,#d5cbb2,
|
|
1416
|
+
Ati-Ati Amber,#ff7e02,
|
|
1416
1417
|
Atlantic Blue,#008997,
|
|
1417
1418
|
Atlantic Breeze,#cbe1ee,
|
|
1418
1419
|
Atlantic Charter,#2b2f41,
|
|
@@ -1879,6 +1880,7 @@ Banana Yellow,#ffe135,
|
|
|
1879
1880
|
Banana Yogurt,#fae7b5,
|
|
1880
1881
|
Bananarama,#e4d466,
|
|
1881
1882
|
Bananas Foster,#dbbe97,
|
|
1883
|
+
Banaue Jade,#00a86c,
|
|
1882
1884
|
Bancha,#666a47,x
|
|
1883
1885
|
Bancroft Village,#816e54,
|
|
1884
1886
|
Band-Aid,#d7a97c,
|
|
@@ -1904,6 +1906,7 @@ Banyan Serenity,#98ab8c,
|
|
|
1904
1906
|
Banyan Tree,#8d793e,
|
|
1905
1907
|
Bara Red,#e9546b,
|
|
1906
1908
|
Baragon Brown,#551100,
|
|
1909
|
+
Barako Brew,#4b2d2a,
|
|
1907
1910
|
Barbados,#3e6676,
|
|
1908
1911
|
Barbados Bay,#006665,
|
|
1909
1912
|
Barbados Beige,#b8a983,
|
|
@@ -7301,6 +7304,7 @@ Dasyphyllous Green,#0bdb43,
|
|
|
7301
7304
|
Date Fruit Brown,#af642b,
|
|
7302
7305
|
DaVanzo Beige,#ccac86,
|
|
7303
7306
|
DaVanzo Green,#58936d,
|
|
7307
|
+
Davao Durian,#6c4226,
|
|
7304
7308
|
Davao Green,#b1d27b,
|
|
7305
7309
|
Dave’s Den,#c3bfae,
|
|
7306
7310
|
Davy’s Grey,#535554,
|
|
@@ -13509,6 +13513,7 @@ Ionized-air Glow,#55ddff,
|
|
|
13509
13513
|
Iqaluit Ice,#93cfe3,
|
|
13510
13514
|
Ireland Green,#006c2e,
|
|
13511
13515
|
Iridescent,#3a5b52,x
|
|
13516
|
+
Iridescent Blue,#0153c8,
|
|
13512
13517
|
Iridescent Green,#48c072,
|
|
13513
13518
|
Iridescent Peacock,#00707d,
|
|
13514
13519
|
Iridescent Purple,#966fd6,
|
|
@@ -14320,6 +14325,7 @@ Kyoto Pearl,#dfd6d1,
|
|
|
14320
14325
|
Kyuri Green,#4b5d16,
|
|
14321
14326
|
La Grange,#7a7a60,
|
|
14322
14327
|
Là Jiāo Hóng Red,#fc2647,
|
|
14328
|
+
La La Lavender,#a3498a,
|
|
14323
14329
|
La La Love,#bf90bb,x
|
|
14324
14330
|
La Luna,#ffffe5,x
|
|
14325
14331
|
La Luna Amarilla,#fddfa0,
|
|
@@ -16099,6 +16105,7 @@ Maniac Green,#009000,x
|
|
|
16099
16105
|
Maniac Mansion,#004058,x
|
|
16100
16106
|
Manifest,#899888,
|
|
16101
16107
|
Manila,#e7c9a9,
|
|
16108
|
+
Manila Sunset,#ff6e61,
|
|
16102
16109
|
Manila Tint,#ffe2a7,
|
|
16103
16110
|
Manitou Blue,#5b92a2,
|
|
16104
16111
|
Mann Orange,#cf7336,
|
|
@@ -16386,6 +16393,7 @@ Maybeck Muslin,#eddfc9,
|
|
|
16386
16393
|
Mayfair White,#e6f0de,
|
|
16387
16394
|
Mayflower Orchid,#ed93d7,
|
|
16388
16395
|
Mayfly,#696841,
|
|
16396
|
+
Mayon Mist,#e1e6f0,
|
|
16389
16397
|
Mayonnaise,#f6eed1,x
|
|
16390
16398
|
Maypole,#bee8d3,
|
|
16391
16399
|
Mazarine Blue,#2a407e,
|
|
@@ -19053,6 +19061,7 @@ Overcast Brick,#b3583d,
|
|
|
19053
19061
|
Overcast Day,#8f99a2,
|
|
19054
19062
|
Overcast Night,#42426f,
|
|
19055
19063
|
Overcast Sky,#a7b8c4,
|
|
19064
|
+
Overchlorinated Pool,#0ae9b4,
|
|
19056
19065
|
Overdue Blue,#4400ff,x
|
|
19057
19066
|
Overdue Grey,#c7c3be,
|
|
19058
19067
|
Overexposed Shot,#eff4dc,
|
|
@@ -19342,6 +19351,7 @@ Palomino Pony,#837871,
|
|
|
19342
19351
|
Palomino Tan,#c2aa8d,
|
|
19343
19352
|
Pampas,#eae4dc,
|
|
19344
19353
|
Pampered Princess,#f5eaeb,
|
|
19354
|
+
Pan de Coco,#dca356,
|
|
19345
19355
|
Pan Purple,#657aef,x
|
|
19346
19356
|
Pan Tostado,#e8be99,
|
|
19347
19357
|
Panache,#ebf7e4,
|
|
@@ -21525,6 +21535,7 @@ Purple Void,#442244,x
|
|
|
21525
21535
|
Purple White,#d3c2cf,
|
|
21526
21536
|
Purple Wine,#97397f,
|
|
21527
21537
|
Purple Wineberry,#5a395b,
|
|
21538
|
+
Purple Yam,#a846d7,
|
|
21528
21539
|
Purple Yearning,#dd1166,
|
|
21529
21540
|
Purple Zergling,#a15589,x
|
|
21530
21541
|
Purple’s Baby Sister,#eec3ee,x
|
|
@@ -21786,6 +21797,7 @@ Rainforest,#009a70,x
|
|
|
21786
21797
|
Rainforest Dew,#e6dab1,
|
|
21787
21798
|
Rainforest Fern,#cec192,
|
|
21788
21799
|
Rainforest Glow,#b2c346,
|
|
21800
|
+
Rainforest Matcha,#446019,
|
|
21789
21801
|
Rainforest Nights,#002200,
|
|
21790
21802
|
Rainforest Zipline,#7f795f,
|
|
21791
21803
|
Rainier Blue,#558484,
|
|
@@ -23362,6 +23374,7 @@ Sambuca,#3b2e25,
|
|
|
23362
23374
|
Sambucus,#17182b,
|
|
23363
23375
|
Samoan Sun,#fabc46,
|
|
23364
23376
|
Samovar Silver,#b8bebe,
|
|
23377
|
+
Sampaguita Pearl,#f7f3e6,
|
|
23365
23378
|
Samphire Green,#4db560,
|
|
23366
23379
|
San Antonio Sage,#a69474,
|
|
23367
23380
|
San Carlos Plaza,#d9bb8e,
|
|
@@ -24577,6 +24590,7 @@ Simply White,#ebede7,
|
|
|
24577
24590
|
Simpson Surprise,#82856d,
|
|
24578
24591
|
Simpsons Yellow,#ffd90f,
|
|
24579
24592
|
Sin City,#cfa236,
|
|
24593
|
+
Sinag Gold,#ffd500,
|
|
24580
24594
|
Sinatra,#4675b7,
|
|
24581
24595
|
Sinbad,#a6d5d0,
|
|
24582
24596
|
Sinful,#645059,
|
|
@@ -27814,6 +27828,7 @@ Tsunami,#869baf,
|
|
|
27814
27828
|
Tsurubami Green,#9ba88d,
|
|
27815
27829
|
Tǔ Hēi Black,#574d35,
|
|
27816
27830
|
Tuatara,#454642,
|
|
27831
|
+
Tubbataha Teal,#0e8787,
|
|
27817
27832
|
Tuberose,#fffaec,
|
|
27818
27833
|
Tucson Teal,#00858b,
|
|
27819
27834
|
Tudor Ice,#c1cecf,
|
|
@@ -28003,6 +28018,7 @@ Tzatziki Green,#ddeecc,
|
|
|
28003
28018
|
UA Blue,#0033aa,
|
|
28004
28019
|
UA Red,#d9004c,
|
|
28005
28020
|
Ube,#8878c3,
|
|
28021
|
+
Ube Halaya,#a86093,
|
|
28006
28022
|
Über Umber,#7b5838,
|
|
28007
28023
|
UCLA Blue,#536895,
|
|
28008
28024
|
UCLA Gold,#ffb300,
|