chromonym 3.7.2 → 3.9.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.
@@ -0,0 +1,75 @@
1
+ import { standardNormalize } from './normalize.js';
2
+ /**
3
+ * Identity colors published by the U.S. Army, Department of the Air Force,
4
+ * and Department of War. Keys combine the service with each guide's color
5
+ * name so that similarly named colors remain unambiguous.
6
+ *
7
+ * Sources: U.S. Army Brand Guidelines v1.0 (March 2023), pp. 24 and 26;
8
+ * Air Force Symbol and Emblem color guidance; and the U.S. Department of War
9
+ * Brand Guide (updated September 25, 2025). These U.S. Government
10
+ * publications and their factual color values are not subject to copyright
11
+ * restrictions in the United States. See NOTICE.md.
12
+ *
13
+ * DOW Blue is named "Primary Blue" in the Department of War guide, and DOW
14
+ * Black is named "Slate Black." The service prefix follows the guide's
15
+ * identity rather than repeating those generic source labels.
16
+ *
17
+ * Default metric: `'deltaE2000'`; perceptual matching distinguishes the
18
+ * palette's close gray and blue identity colors.
19
+ */
20
+ const usMilitaryColors = {
21
+ // U.S. Army Brand Guidelines v1.0 (March 2023), pp. 24 and 26.
22
+ 'Army Black': '#221f20',
23
+ 'Army Gold': '#ffcc01',
24
+ 'Army Green': '#2f372f',
25
+ 'Army Tan': '#f1e4c7',
26
+ 'Army Field 01': '#727365',
27
+ 'Army Field 02': '#bfb8a6',
28
+ 'Army Gray 01': '#565557',
29
+ 'Army Gray 02': '#d5d5d7',
30
+ 'Army Highlight Orange': '#f16521',
31
+ 'Army Highlight Green': '#2daa27',
32
+ 'Army Highlight Red': '#cf0000',
33
+ // Air Force Symbol colors, U.S. Air Force trademark guidance:
34
+ // https://www.trademark.af.mil/Branding/Air-Force-Symbol/
35
+ 'Air Force Blue': '#00308f',
36
+ 'Air Force Grey': '#a6a6a8',
37
+ 'Air Force Chrome': '#8f8f8c',
38
+ // Air Force Emblem colors, U.S. Air Force trademark guidance:
39
+ // https://www.trademark.af.mil/Branding/The-Air-Force-Emblem/
40
+ 'Air Force Ultramarine Blue': '#00539f',
41
+ 'Air Force Yellow': '#ffd520',
42
+ 'Air Force Brittany Blue': '#95c4da',
43
+ 'Air Force Orange': '#f5831f',
44
+ 'Air Force Silver Gray': '#b2b4b7',
45
+ 'Air Force Gold Brown': '#cf7418',
46
+ // U.S. Department of War Brand Guide, updated September 25, 2025:
47
+ // https://www.war.gov/Brand-Guide/
48
+ 'DOW Blue': '#355e93',
49
+ 'DOW Gray': '#333333',
50
+ 'DOW Hazy Blue': '#ebeff5',
51
+ 'DOW Steel Blue': '#aebfd4',
52
+ 'DOW Cadet Blue': '#728fb4',
53
+ 'DOW Ocean Blue': '#254267',
54
+ 'DOW Space Blue': '#15263b',
55
+ 'DOW Harbor Gray': '#ebebeb',
56
+ 'DOW Smoke Gray': '#adadad',
57
+ 'DOW Anchor Gray': '#717171',
58
+ 'DOW Black': '#141414',
59
+ };
60
+ /**
61
+ * U.S. military identity colors as a `Palette<UsMilitaryColorName>`.
62
+ * The standard normalizer accepts any case and ignores spaces and punctuation.
63
+ *
64
+ * @example
65
+ * identify('#00308f', { palette: usMilitary }); // 'Air Force Blue'
66
+ * resolve('army highlight red', { palette: usMilitary }); // '#cf0000'
67
+ * usMilitary.colors['DOW Space Blue']; // '#15263b'
68
+ */
69
+ export const usMilitary = {
70
+ name: 'usMilitary',
71
+ colors: usMilitaryColors,
72
+ normalize: standardNormalize,
73
+ defaultMetric: 'deltaE2000',
74
+ };
75
+ //# sourceMappingURL=usMilitary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usMilitary.js","sourceRoot":"","sources":["../../src/palettes/usMilitary.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,gBAAgB,GAAG;IACvB,+DAA+D;IAC/D,YAAY,EAAE,SAAS;IACvB,WAAW,EAAE,SAAS;IACtB,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,SAAS;IAC1B,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,SAAS;IACzB,uBAAuB,EAAE,SAAS;IAClC,sBAAsB,EAAE,SAAS;IACjC,oBAAoB,EAAE,SAAS;IAE/B,8DAA8D;IAC9D,0DAA0D;IAC1D,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,kBAAkB,EAAE,SAAS;IAE7B,8DAA8D;IAC9D,8DAA8D;IAC9D,4BAA4B,EAAE,SAAS;IACvC,kBAAkB,EAAE,SAAS;IAC7B,yBAAyB,EAAE,SAAS;IACpC,kBAAkB,EAAE,SAAS;IAC7B,uBAAuB,EAAE,SAAS;IAClC,sBAAsB,EAAE,SAAS;IAEjC,kEAAkE;IAClE,mCAAmC;IACnC,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,eAAe,EAAE,SAAS;IAC1B,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,gBAAgB,EAAE,SAAS;IAC3B,iBAAiB,EAAE,SAAS;IAC5B,gBAAgB,EAAE,SAAS;IAC3B,iBAAiB,EAAE,SAAS;IAC5B,WAAW,EAAE,SAAS;CACd,CAAC;AAIX;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,gBAAgB;IACxB,SAAS,EAAE,iBAAiB;IAC5B,aAAa,EAAE,YAAY;CACoB,CAAC","sourcesContent":["import type { Palette } from '../types.js';\nimport { standardNormalize } from './normalize.js';\n\n/**\n * Identity colors published by the U.S. Army, Department of the Air Force,\n * and Department of War. Keys combine the service with each guide's color\n * name so that similarly named colors remain unambiguous.\n *\n * Sources: U.S. Army Brand Guidelines v1.0 (March 2023), pp. 24 and 26;\n * Air Force Symbol and Emblem color guidance; and the U.S. Department of War\n * Brand Guide (updated September 25, 2025). These U.S. Government\n * publications and their factual color values are not subject to copyright\n * restrictions in the United States. See NOTICE.md.\n *\n * DOW Blue is named \"Primary Blue\" in the Department of War guide, and DOW\n * Black is named \"Slate Black.\" The service prefix follows the guide's\n * identity rather than repeating those generic source labels.\n *\n * Default metric: `'deltaE2000'`; perceptual matching distinguishes the\n * palette's close gray and blue identity colors.\n */\nconst usMilitaryColors = {\n // U.S. Army Brand Guidelines v1.0 (March 2023), pp. 24 and 26.\n 'Army Black': '#221f20',\n 'Army Gold': '#ffcc01',\n 'Army Green': '#2f372f',\n 'Army Tan': '#f1e4c7',\n 'Army Field 01': '#727365',\n 'Army Field 02': '#bfb8a6',\n 'Army Gray 01': '#565557',\n 'Army Gray 02': '#d5d5d7',\n 'Army Highlight Orange': '#f16521',\n 'Army Highlight Green': '#2daa27',\n 'Army Highlight Red': '#cf0000',\n\n // Air Force Symbol colors, U.S. Air Force trademark guidance:\n // https://www.trademark.af.mil/Branding/Air-Force-Symbol/\n 'Air Force Blue': '#00308f',\n 'Air Force Grey': '#a6a6a8',\n 'Air Force Chrome': '#8f8f8c',\n\n // Air Force Emblem colors, U.S. Air Force trademark guidance:\n // https://www.trademark.af.mil/Branding/The-Air-Force-Emblem/\n 'Air Force Ultramarine Blue': '#00539f',\n 'Air Force Yellow': '#ffd520',\n 'Air Force Brittany Blue': '#95c4da',\n 'Air Force Orange': '#f5831f',\n 'Air Force Silver Gray': '#b2b4b7',\n 'Air Force Gold Brown': '#cf7418',\n\n // U.S. Department of War Brand Guide, updated September 25, 2025:\n // https://www.war.gov/Brand-Guide/\n 'DOW Blue': '#355e93',\n 'DOW Gray': '#333333',\n 'DOW Hazy Blue': '#ebeff5',\n 'DOW Steel Blue': '#aebfd4',\n 'DOW Cadet Blue': '#728fb4',\n 'DOW Ocean Blue': '#254267',\n 'DOW Space Blue': '#15263b',\n 'DOW Harbor Gray': '#ebebeb',\n 'DOW Smoke Gray': '#adadad',\n 'DOW Anchor Gray': '#717171',\n 'DOW Black': '#141414',\n} as const;\n\nexport type UsMilitaryColorName = keyof typeof usMilitaryColors;\n\n/**\n * U.S. military identity colors as a `Palette<UsMilitaryColorName>`.\n * The standard normalizer accepts any case and ignores spaces and punctuation.\n *\n * @example\n * identify('#00308f', { palette: usMilitary }); // 'Air Force Blue'\n * resolve('army highlight red', { palette: usMilitary }); // '#cf0000'\n * usMilitary.colors['DOW Space Blue']; // '#15263b'\n */\nexport const usMilitary = {\n name: 'usMilitary',\n colors: usMilitaryColors,\n normalize: standardNormalize,\n defaultMetric: 'deltaE2000',\n} as const satisfies Palette<UsMilitaryColorName>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chromonym",
3
- "description": "Find the nearest named color for any hex, RGB, HSL, or HSV value. One color-naming API for any palette: identify, resolve, and convert color names across your own palette or nineteen built-in sets (CSS, X11, Pantone, Crayola, NTC, XKCD, RAL, Tailwind, Material, USWDS, Resene, NCS, ISCC-NBS, NBS, FS 595 B/C, MIL-STD-2525D, Werner, Pokemon); fully typed, tree-shakeable, perceptual color distance (CIEDE2000 / OKLAB).",
3
+ "description": "Find the nearest named color for any hex, RGB, HSL, or HSV value. One color-naming API for any palette: identify, resolve, and convert color names across your own palette or twenty-one built-in sets (CSS, X11, Pantone, Copic, Crayola, NTC, XKCD, RAL, Tailwind, Material, USWDS, Resene, NCS, ISCC-NBS, NBS, FS 595 B/C, MIL-STD-2525D, US military identity colors, Werner, Pokemon); fully typed, tree-shakeable, perceptual color distance (CIEDE2000 / OKLAB).",
4
4
  "keywords": [
5
5
  "color",
6
6
  "colors",
@@ -15,6 +15,7 @@
15
15
  "css-colors",
16
16
  "x11-colors",
17
17
  "pantone",
18
+ "copic",
18
19
  "crayola",
19
20
  "ral",
20
21
  "tailwind",
@@ -33,7 +34,7 @@
33
34
  ],
34
35
  "author": "the-simian <info@simiancraft.com>",
35
36
  "license": "MIT",
36
- "version": "3.7.2",
37
+ "version": "3.9.0",
37
38
  "homepage": "https://github.com/simiancraft/chromonym#readme",
38
39
  "repository": {
39
40
  "type": "git",
@@ -68,6 +69,11 @@
68
69
  "import": "./dist/palettes/pantone.js",
69
70
  "default": "./dist/palettes/pantone.js"
70
71
  },
72
+ "./copic": {
73
+ "types": "./dist/palettes/copic.d.ts",
74
+ "import": "./dist/palettes/copic.js",
75
+ "default": "./dist/palettes/copic.js"
76
+ },
71
77
  "./pokemon": {
72
78
  "types": "./dist/palettes/pokemon.d.ts",
73
79
  "import": "./dist/palettes/pokemon.js",
@@ -118,6 +124,11 @@
118
124
  "import": "./dist/palettes/milStd2525d.js",
119
125
  "default": "./dist/palettes/milStd2525d.js"
120
126
  },
127
+ "./us-military": {
128
+ "types": "./dist/palettes/usMilitary.d.ts",
129
+ "import": "./dist/palettes/usMilitary.js",
130
+ "default": "./dist/palettes/usMilitary.js"
131
+ },
121
132
  "./nbs": {
122
133
  "types": "./dist/palettes/nbs.d.ts",
123
134
  "import": "./dist/palettes/nbs.js",