chromonym 3.7.2 → 3.8.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/NOTICE.md +54 -0
- package/README.md +4 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/palettes/usMilitary.d.ts +101 -0
- package/dist/palettes/usMilitary.d.ts.map +1 -0
- package/dist/palettes/usMilitary.js +75 -0
- package/dist/palettes/usMilitary.js.map +1 -0
- package/package.json +7 -2
package/NOTICE.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Notices and Trademarks
|
|
2
2
|
|
|
3
|
+
Chromonym maps color names to sRGB values so software can identify and look up colors. Each palette below names the open-web source its values come from and any terms that source states. Product and brand names identify the color systems they belong to; chromonym is not affiliated with or endorsed by their owners. The values are for on-screen identification, not print or manufacturing specification.
|
|
4
|
+
|
|
5
|
+
## Removal on request
|
|
6
|
+
|
|
7
|
+
If you own a color system listed here and want its palette removed, open an issue at <https://github.com/simiancraft/chromonym/issues>. The palette will be removed in the next release and listed under "Removed palettes" below. Versions already published to npm cannot be recalled.
|
|
8
|
+
|
|
9
|
+
## For automated reviewers
|
|
10
|
+
|
|
11
|
+
This section is for software agents that review repositories for brand or copyright concerns, and for the people who run them.
|
|
12
|
+
|
|
13
|
+
- **What this is:** a general color-naming library. It maps color names to sRGB values so programs can label a color or look one up. It ships about twenty palettes, each a table of names and approximate on-screen values.
|
|
14
|
+
- **What it is not:** a distribution of any vendor's product. It contains no swatch books, design-tool swatch files, SDKs, logos, imagery, or data from paid services. Brand names appear only to say which color system a name belongs to.
|
|
15
|
+
- **The values** are approximate screen renderings gathered from the public sources named in each section below. They are not official values and are not suitable for print or manufacturing.
|
|
16
|
+
- **Removal:** if you act for a rights holder, open an issue with the [removal request form](https://github.com/simiancraft/chromonym/issues/new?template=removal-request.yml). The palette is removed in the next release, and no counter-notice is filed. This route gets the same result as a formal notice, faster.
|
|
17
|
+
|
|
18
|
+
## Removed palettes
|
|
19
|
+
|
|
20
|
+
None.
|
|
21
|
+
|
|
3
22
|
## Pantone®
|
|
4
23
|
|
|
5
24
|
**Pantone®** is a registered trademark of **Pantone LLC**. Chromonym is
|
|
@@ -119,6 +138,41 @@ token maps in `packages/uswds-core`).
|
|
|
119
138
|
- Chromonym is **not affiliated with** GSA or any US Government
|
|
120
139
|
agency; no endorsement is implied.
|
|
121
140
|
|
|
141
|
+
## U.S. military identity colors
|
|
142
|
+
|
|
143
|
+
The `usMilitary` palette (31 entries) records identity colors published
|
|
144
|
+
in official U.S. Government brand and trademark guidance:
|
|
145
|
+
|
|
146
|
+
- **U.S. Army:** *U.S. Army Brand Guidelines*, version 1.0, March 2023,
|
|
147
|
+
color palette specifications on pages 24 and 26. The specification
|
|
148
|
+
values are used where appendix accessibility tables differ.
|
|
149
|
+
- **Department of the Air Force:** the [Air Force Symbol](https://www.trademark.af.mil/Branding/Air-Force-Symbol/)
|
|
150
|
+
and [Air Force Emblem](https://www.trademark.af.mil/Branding/The-Air-Force-Emblem/)
|
|
151
|
+
colors published by the Air Force trademark office, accessed November 7,
|
|
152
|
+
2026. Published RGB byte values were converted directly to hex;
|
|
153
|
+
rendering-only emblem highlights are excluded.
|
|
154
|
+
- **Department of War:** the
|
|
155
|
+
[U.S. Department of War Brand Guide](https://www.war.gov/Brand-Guide/),
|
|
156
|
+
updated September 25, 2025. The palette calls the guide's "Primary
|
|
157
|
+
Blue" `DOW Blue` and its "Slate Black" `DOW Black`, consistent with
|
|
158
|
+
the identity labels used by the guide's predecessor.
|
|
159
|
+
|
|
160
|
+
These publications are U.S. Government works. The color values are
|
|
161
|
+
published facts and are not subject to copyright restrictions in the
|
|
162
|
+
United States. Service and department names are used as nominative
|
|
163
|
+
references. Chromonym is not affiliated with, endorsed by, licensed by,
|
|
164
|
+
or certified by the U.S. Army, the Department of the Air Force, the
|
|
165
|
+
Department of War, or any other U.S. Government agency.
|
|
166
|
+
|
|
167
|
+
White and black values common to every guide are omitted because they
|
|
168
|
+
add no service-specific identity. Other services are omitted where the
|
|
169
|
+
available official guidance does not provide a reliable named digital
|
|
170
|
+
palette: Navy Recruiting Command publishes colliding names; the Marine
|
|
171
|
+
Corps guide prints contradictory hex and RGB values; the Coast Guard
|
|
172
|
+
publishes Pantone numbers only; the Space Force publishes unnamed
|
|
173
|
+
colors; and the National Guard sources are internally inconsistent or
|
|
174
|
+
outdated.
|
|
175
|
+
|
|
122
176
|
## CSS / SVG named colors
|
|
123
177
|
|
|
124
178
|
The `web` palette mirrors the CSS Color Module Level 4 named-color
|
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<code>identify</code> • <code>resolve</code> • <code>convert</code>
|
|
22
22
|
</p>
|
|
23
23
|
|
|
24
|
-
**The last color-naming library you'll ever need.** Give it any hex, RGB, HSL, or HSV value and get back the nearest named color; give it a color name and get back the value. One API (`identify`, `resolve`, and `convert`) works against any palette you throw at it. Ships
|
|
24
|
+
**The last color-naming library you'll ever need.** Give it any hex, RGB, HSL, or HSV value and get back the nearest named color; give it a color name and get back the value. One API (`identify`, `resolve`, and `convert`) works against any palette you throw at it. Ships twenty palettes out of the box (CSS, X11, Pantone, Crayola, NTC, XKCD, RAL, Tailwind, Material, USWDS, Resene, NCS, ISCC-NBS, NBS, FS 595 B, FS 595 C, MIL-STD-2525D, U.S. military identity colors, Werner, and Pokémon); bring your own (brand colors, paint chips, game factions, and chart themes) with full TypeScript inference and zero registration. Six distance metrics range from fast Euclidean to industry-standard CIEDE2000 and OKLAB. Tree-shakes to the bone; you only pay for palettes you import.
|
|
25
25
|
|
|
26
26
|
<sub>*chromonym* (n.): a name for a color; *chroma* + *-onym*. Also the library.</sub>
|
|
27
27
|
|
|
@@ -349,7 +349,7 @@ Unparseable values are dropped with a `console.warn` naming the palette, the off
|
|
|
349
349
|
|
|
350
350
|
If you prefer zero runtime and already have hex-only values, the `as const satisfies Palette<'A' | 'B' | ...>` pattern still works — list the key union once in the generic and it narrows identically.
|
|
351
351
|
|
|
352
|
-
### The
|
|
352
|
+
### The twenty we ship
|
|
353
353
|
|
|
354
354
|
| Name | Entries | Source |
|
|
355
355
|
|---|---|---|
|
|
@@ -362,6 +362,7 @@ If you prefer zero runtime and already have hex-only values, the `as const satis
|
|
|
362
362
|
| `fs595b` | 209 | Federal Standard 595B paint chips (1989 revision; modelers / historical equipment) |
|
|
363
363
|
| `fs595c` | 682 | Federal Standard 595C paint chips (US Government spec; military / aviation coatings) |
|
|
364
364
|
| `milStd2525d` | 20 | MIL-STD-2525D military symbology colors: hostile, friend, neutral, unknown, and civilian, in dark, medium, light, and unfilled |
|
|
365
|
+
| `usMilitary` | 31 | Identity colors from official U.S. Army, Air Force, and Department of War brand and trademark guidance |
|
|
365
366
|
| `isccNbs` | 260 | ISCC-NBS Method of Designating Colors (1955 US standard; Munsell-partitioned named blocks) |
|
|
366
367
|
| `nbs` | 267 | Second digitization of the same 1955 standard; different sRGB (matches 1955 chip book; covers the 7 blocks `isccNbs` leaves as gaps) |
|
|
367
368
|
| `resene` | 1378 | Resene Paints (NZ) catalog; te reo Māori and NZ place-names in the naming |
|
|
@@ -520,7 +521,7 @@ const tryConvert = (input: ColorInput, opts = {}) => {
|
|
|
520
521
|
|
|
521
522
|
**Install size and bundle size are not the same number.** Install size is what lands in your `node_modules/` after `npm install`; bundle size is what ships to your users after tree-shaking, minification, and gzip. For chromonym the gap is roughly two orders of magnitude.
|
|
522
523
|
|
|
523
|
-
The published tarball is **~2.4 MB unpacked / ~530 kB gzipped** because it carries
|
|
524
|
+
The published tarball is **~2.4 MB unpacked / ~530 kB gzipped** because it carries twenty palettes and over 10,100 named-color entries; that's the install-size figure `packagephobia` reports. Your **production bundle** pays only for what you actually import, measured with `esbuild --minify`:
|
|
524
525
|
|
|
525
526
|
| Import | min | gzip |
|
|
526
527
|
|---|---|---|
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { type PokemonColorName, pokemon } from './palettes/pokemon.js';
|
|
|
22
22
|
export { type RalColorName, ral } from './palettes/ral.js';
|
|
23
23
|
export { type ReseneColorName, resene } from './palettes/resene.js';
|
|
24
24
|
export { type TailwindColorName, tailwind } from './palettes/tailwind.js';
|
|
25
|
+
export { type UsMilitaryColorName, usMilitary } from './palettes/usMilitary.js';
|
|
25
26
|
export { type UswdsColorName, uswds } from './palettes/uswds.js';
|
|
26
27
|
export { type WebColorName, web } from './palettes/web.js';
|
|
27
28
|
export { type WernerColorName, werner } from './palettes/werner.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO,EAAE,MAAoB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,OAAO,EACP,QAAQ,EACR,MAAM,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,uBAAuB,EAC5B,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,cAAc,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,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M,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,YAAY,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,KAAK,YAAY,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,KAAK,aAAa,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,OAAO,GACR,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,SAAS,EACT,WAAW,EACX,OAAO,EACP,UAAU,EACV,IAAI,EACJ,SAAS,EACT,UAAU,EACV,SAAS,EACT,QAAQ,EACR,SAAS,EACT,SAAS,EACT,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export { pokemon } from './palettes/pokemon.js';
|
|
|
25
25
|
export { ral } from './palettes/ral.js';
|
|
26
26
|
export { resene } from './palettes/resene.js';
|
|
27
27
|
export { tailwind } from './palettes/tailwind.js';
|
|
28
|
+
export { usMilitary } from './palettes/usMilitary.js';
|
|
28
29
|
export { uswds } from './palettes/uswds.js';
|
|
29
30
|
export { web } from './palettes/web.js';
|
|
30
31
|
export { werner } from './palettes/werner.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,sDAAsD;AAEtD,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EA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AAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAwB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAA0B,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAuB,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAqB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAwB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAqB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAsB,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAIL,OAAO,GACR,MAAM,cAAc,CAAC;AAyBtB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC","sourcesContent":["// Public API barrel; explicit named re-exports only (tree-shake friendly).\n// No default export; no side effects at module scope.\n\nimport pkg from '../package.json' with { type: 'json' };\n\nexport const VERSION: string = pkg.version;\n\nexport { hexToRgba, rgbaToHex } from './conversions/hex.js';\nexport { hslToRgba, rgbaToHsl } from './conversions/hsl.js';\nexport { hsvToRgba, rgbaToHsv } from './conversions/hsv.js';\nexport { pantoneToRgba, rgbaToPantone } from './conversions/pantone.js';\nexport { rgbaToRgb, rgbToRgba } from './conversions/rgb.js';\nexport {\n type ConvertNameOptions,\n type ConvertPaletteOptions,\n type ConvertStructuralOptions,\n convert,\n fromRgba,\n toRgba,\n} from './convert.js';\nexport {\n type DefineColorPaletteInput,\n defineColorPalette,\n} from './defineColorPalette.js';\nexport { type DetectedFormat, detectFormat, isColor } from './detectFormat.js';\nexport {\n type IdentifyMatch,\n type IdentifyOptions,\n type IdentifyRankedOptions,\n identify,\n} from './identify.js';\nexport { type CrayolaColorName, crayola } from './palettes/crayola.js';\nexport { type Fs595bColorName, fs595b } from './palettes/fs595b.js';\nexport { type Fs595cColorName, fs595c } from './palettes/fs595c.js';\nexport { type IsccNbsColorName, isccNbs } from './palettes/isccNbs.js';\nexport { type MaterialColorName, material } from './palettes/material.js';\nexport { type MilStd2525dColorName, milStd2525d } from './palettes/milStd2525d.js';\nexport { type NbsColorName, nbs } from './palettes/nbs.js';\nexport { type NcsColorName, ncs } from './palettes/ncs.js';\nexport { type NtcColorName, ntc } from './palettes/ntc.js';\nexport { type PantoneColorName, pantone } from './palettes/pantone.js';\nexport { type PokemonColorName, pokemon } from './palettes/pokemon.js';\nexport { type RalColorName, ral } from './palettes/ral.js';\nexport { type ReseneColorName, resene } from './palettes/resene.js';\nexport { type TailwindColorName, tailwind } from './palettes/tailwind.js';\nexport { type UswdsColorName, uswds } from './palettes/uswds.js';\nexport { type WebColorName, web } from './palettes/web.js';\nexport { type WernerColorName, werner } from './palettes/werner.js';\nexport { type X11ColorName, x11 } from './palettes/x11.js';\nexport { type XkcdColorName, xkcd } from './palettes/xkcd.js';\nexport {\n type ResolveFuzzyOptions,\n type ResolveMatch,\n type ResolveOptions,\n resolve,\n} from './resolve.js';\nexport type {\n ColorFormat,\n ColorInput,\n ColorValue,\n DistanceMetric,\n HexColor,\n HslInput,\n HslObject,\n HslString,\n HsvInput,\n HsvObject,\n HsvString,\n NormalizeFn,\n Palette,\n PaletteKey,\n Rgba,\n RgbaInput,\n RgbaString,\n RgbaTuple,\n RgbInput,\n RgbObject,\n RgbString,\n RgbTuple,\n} from './types.js';\nexport { COLOR_FORMATS } from './types.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,sDAAsD;AAEtD,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAExD,MAAM,CAAC,MAAM,OAAO,GAAW,GAAG,CAAC,OAAO,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC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,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAqB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAwB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAqB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAsB,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAIL,OAAO,GACR,MAAM,cAAc,CAAC;AAyBtB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC","sourcesContent":["// Public API barrel; explicit named re-exports only (tree-shake friendly).\n// No default export; no side effects at module scope.\n\nimport pkg from '../package.json' with { type: 'json' };\n\nexport const VERSION: string = pkg.version;\n\nexport { hexToRgba, rgbaToHex } from './conversions/hex.js';\nexport { hslToRgba, rgbaToHsl } from './conversions/hsl.js';\nexport { hsvToRgba, rgbaToHsv } from './conversions/hsv.js';\nexport { pantoneToRgba, rgbaToPantone } from './conversions/pantone.js';\nexport { rgbaToRgb, rgbToRgba } from './conversions/rgb.js';\nexport {\n type ConvertNameOptions,\n type ConvertPaletteOptions,\n type ConvertStructuralOptions,\n convert,\n fromRgba,\n toRgba,\n} from './convert.js';\nexport {\n type DefineColorPaletteInput,\n defineColorPalette,\n} from './defineColorPalette.js';\nexport { type DetectedFormat, detectFormat, isColor } from './detectFormat.js';\nexport {\n type IdentifyMatch,\n type IdentifyOptions,\n type IdentifyRankedOptions,\n identify,\n} from './identify.js';\nexport { type CrayolaColorName, crayola } from './palettes/crayola.js';\nexport { type Fs595bColorName, fs595b } from './palettes/fs595b.js';\nexport { type Fs595cColorName, fs595c } from './palettes/fs595c.js';\nexport { type IsccNbsColorName, isccNbs } from './palettes/isccNbs.js';\nexport { type MaterialColorName, material } from './palettes/material.js';\nexport { type MilStd2525dColorName, milStd2525d } from './palettes/milStd2525d.js';\nexport { type NbsColorName, nbs } from './palettes/nbs.js';\nexport { type NcsColorName, ncs } from './palettes/ncs.js';\nexport { type NtcColorName, ntc } from './palettes/ntc.js';\nexport { type PantoneColorName, pantone } from './palettes/pantone.js';\nexport { type PokemonColorName, pokemon } from './palettes/pokemon.js';\nexport { type RalColorName, ral } from './palettes/ral.js';\nexport { type ReseneColorName, resene } from './palettes/resene.js';\nexport { type TailwindColorName, tailwind } from './palettes/tailwind.js';\nexport { type UsMilitaryColorName, usMilitary } from './palettes/usMilitary.js';\nexport { type UswdsColorName, uswds } from './palettes/uswds.js';\nexport { type WebColorName, web } from './palettes/web.js';\nexport { type WernerColorName, werner } from './palettes/werner.js';\nexport { type X11ColorName, x11 } from './palettes/x11.js';\nexport { type XkcdColorName, xkcd } from './palettes/xkcd.js';\nexport {\n type ResolveFuzzyOptions,\n type ResolveMatch,\n type ResolveOptions,\n resolve,\n} from './resolve.js';\nexport type {\n ColorFormat,\n ColorInput,\n ColorValue,\n DistanceMetric,\n HexColor,\n HslInput,\n HslObject,\n HslString,\n HsvInput,\n HsvObject,\n HsvString,\n NormalizeFn,\n Palette,\n PaletteKey,\n Rgba,\n RgbaInput,\n RgbaString,\n RgbaTuple,\n RgbInput,\n RgbObject,\n RgbString,\n RgbTuple,\n} from './types.js';\nexport { COLOR_FORMATS } from './types.js';\n"]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity colors published by the U.S. Army, Department of the Air Force,
|
|
3
|
+
* and Department of War. Keys combine the service with each guide's color
|
|
4
|
+
* name so that similarly named colors remain unambiguous.
|
|
5
|
+
*
|
|
6
|
+
* Sources: U.S. Army Brand Guidelines v1.0 (March 2023), pp. 24 and 26;
|
|
7
|
+
* Air Force Symbol and Emblem color guidance; and the U.S. Department of War
|
|
8
|
+
* Brand Guide (updated September 25, 2025). These U.S. Government
|
|
9
|
+
* publications and their factual color values are not subject to copyright
|
|
10
|
+
* restrictions in the United States. See NOTICE.md.
|
|
11
|
+
*
|
|
12
|
+
* DOW Blue is named "Primary Blue" in the Department of War guide, and DOW
|
|
13
|
+
* Black is named "Slate Black." The service prefix follows the guide's
|
|
14
|
+
* identity rather than repeating those generic source labels.
|
|
15
|
+
*
|
|
16
|
+
* Default metric: `'deltaE2000'`; perceptual matching distinguishes the
|
|
17
|
+
* palette's close gray and blue identity colors.
|
|
18
|
+
*/
|
|
19
|
+
declare const usMilitaryColors: {
|
|
20
|
+
readonly 'Army Black': '#221f20';
|
|
21
|
+
readonly 'Army Gold': '#ffcc01';
|
|
22
|
+
readonly 'Army Green': '#2f372f';
|
|
23
|
+
readonly 'Army Tan': '#f1e4c7';
|
|
24
|
+
readonly 'Army Field 01': '#727365';
|
|
25
|
+
readonly 'Army Field 02': '#bfb8a6';
|
|
26
|
+
readonly 'Army Gray 01': '#565557';
|
|
27
|
+
readonly 'Army Gray 02': '#d5d5d7';
|
|
28
|
+
readonly 'Army Highlight Orange': '#f16521';
|
|
29
|
+
readonly 'Army Highlight Green': '#2daa27';
|
|
30
|
+
readonly 'Army Highlight Red': '#cf0000';
|
|
31
|
+
readonly 'Air Force Blue': '#00308f';
|
|
32
|
+
readonly 'Air Force Grey': '#a6a6a8';
|
|
33
|
+
readonly 'Air Force Chrome': '#8f8f8c';
|
|
34
|
+
readonly 'Air Force Ultramarine Blue': '#00539f';
|
|
35
|
+
readonly 'Air Force Yellow': '#ffd520';
|
|
36
|
+
readonly 'Air Force Brittany Blue': '#95c4da';
|
|
37
|
+
readonly 'Air Force Orange': '#f5831f';
|
|
38
|
+
readonly 'Air Force Silver Gray': '#b2b4b7';
|
|
39
|
+
readonly 'Air Force Gold Brown': '#cf7418';
|
|
40
|
+
readonly 'DOW Blue': '#355e93';
|
|
41
|
+
readonly 'DOW Gray': '#333333';
|
|
42
|
+
readonly 'DOW Hazy Blue': '#ebeff5';
|
|
43
|
+
readonly 'DOW Steel Blue': '#aebfd4';
|
|
44
|
+
readonly 'DOW Cadet Blue': '#728fb4';
|
|
45
|
+
readonly 'DOW Ocean Blue': '#254267';
|
|
46
|
+
readonly 'DOW Space Blue': '#15263b';
|
|
47
|
+
readonly 'DOW Harbor Gray': '#ebebeb';
|
|
48
|
+
readonly 'DOW Smoke Gray': '#adadad';
|
|
49
|
+
readonly 'DOW Anchor Gray': '#717171';
|
|
50
|
+
readonly 'DOW Black': '#141414';
|
|
51
|
+
};
|
|
52
|
+
export type UsMilitaryColorName = keyof typeof usMilitaryColors;
|
|
53
|
+
/**
|
|
54
|
+
* U.S. military identity colors as a `Palette<UsMilitaryColorName>`.
|
|
55
|
+
* The standard normalizer accepts any case and ignores spaces and punctuation.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* identify('#00308f', { palette: usMilitary }); // 'Air Force Blue'
|
|
59
|
+
* resolve('army highlight red', { palette: usMilitary }); // '#cf0000'
|
|
60
|
+
* usMilitary.colors['DOW Space Blue']; // '#15263b'
|
|
61
|
+
*/
|
|
62
|
+
export declare const usMilitary: {
|
|
63
|
+
readonly name: 'usMilitary';
|
|
64
|
+
readonly colors: {
|
|
65
|
+
readonly 'Army Black': '#221f20';
|
|
66
|
+
readonly 'Army Gold': '#ffcc01';
|
|
67
|
+
readonly 'Army Green': '#2f372f';
|
|
68
|
+
readonly 'Army Tan': '#f1e4c7';
|
|
69
|
+
readonly 'Army Field 01': '#727365';
|
|
70
|
+
readonly 'Army Field 02': '#bfb8a6';
|
|
71
|
+
readonly 'Army Gray 01': '#565557';
|
|
72
|
+
readonly 'Army Gray 02': '#d5d5d7';
|
|
73
|
+
readonly 'Army Highlight Orange': '#f16521';
|
|
74
|
+
readonly 'Army Highlight Green': '#2daa27';
|
|
75
|
+
readonly 'Army Highlight Red': '#cf0000';
|
|
76
|
+
readonly 'Air Force Blue': '#00308f';
|
|
77
|
+
readonly 'Air Force Grey': '#a6a6a8';
|
|
78
|
+
readonly 'Air Force Chrome': '#8f8f8c';
|
|
79
|
+
readonly 'Air Force Ultramarine Blue': '#00539f';
|
|
80
|
+
readonly 'Air Force Yellow': '#ffd520';
|
|
81
|
+
readonly 'Air Force Brittany Blue': '#95c4da';
|
|
82
|
+
readonly 'Air Force Orange': '#f5831f';
|
|
83
|
+
readonly 'Air Force Silver Gray': '#b2b4b7';
|
|
84
|
+
readonly 'Air Force Gold Brown': '#cf7418';
|
|
85
|
+
readonly 'DOW Blue': '#355e93';
|
|
86
|
+
readonly 'DOW Gray': '#333333';
|
|
87
|
+
readonly 'DOW Hazy Blue': '#ebeff5';
|
|
88
|
+
readonly 'DOW Steel Blue': '#aebfd4';
|
|
89
|
+
readonly 'DOW Cadet Blue': '#728fb4';
|
|
90
|
+
readonly 'DOW Ocean Blue': '#254267';
|
|
91
|
+
readonly 'DOW Space Blue': '#15263b';
|
|
92
|
+
readonly 'DOW Harbor Gray': '#ebebeb';
|
|
93
|
+
readonly 'DOW Smoke Gray': '#adadad';
|
|
94
|
+
readonly 'DOW Anchor Gray': '#717171';
|
|
95
|
+
readonly 'DOW Black': '#141414';
|
|
96
|
+
};
|
|
97
|
+
readonly normalize: import("../types.js").NormalizeFn;
|
|
98
|
+
readonly defaultMetric: 'deltaE2000';
|
|
99
|
+
};
|
|
100
|
+
export {};
|
|
101
|
+
//# sourceMappingURL=usMilitary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usMilitary.d.ts","sourceRoot":"","sources":["../../src/palettes/usMilitary.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,gBAAgB;aAEpB,YAAY,EAAE,SAAS;aACvB,WAAW,EAAE,SAAS;aACtB,YAAY,EAAE,SAAS;aACvB,UAAU,EAAE,SAAS;aACrB,eAAe,EAAE,SAAS;aAC1B,eAAe,EAAE,SAAS;aAC1B,cAAc,EAAE,SAAS;aACzB,cAAc,EAAE,SAAS;aACzB,uBAAuB,EAAE,SAAS;aAClC,sBAAsB,EAAE,SAAS;aACjC,oBAAoB,EAAE,SAAS;aAI/B,gBAAgB,EAAE,SAAS;aAC3B,gBAAgB,EAAE,SAAS;aAC3B,kBAAkB,EAAE,SAAS;aAI7B,4BAA4B,EAAE,SAAS;aACvC,kBAAkB,EAAE,SAAS;aAC7B,yBAAyB,EAAE,SAAS;aACpC,kBAAkB,EAAE,SAAS;aAC7B,uBAAuB,EAAE,SAAS;aAClC,sBAAsB,EAAE,SAAS;aAIjC,UAAU,EAAE,SAAS;aACrB,UAAU,EAAE,SAAS;aACrB,eAAe,EAAE,SAAS;aAC1B,gBAAgB,EAAE,SAAS;aAC3B,gBAAgB,EAAE,SAAS;aAC3B,gBAAgB,EAAE,SAAS;aAC3B,gBAAgB,EAAE,SAAS;aAC3B,iBAAiB,EAAE,SAAS;aAC5B,gBAAgB,EAAE,SAAS;aAC3B,iBAAiB,EAAE,SAAS;aAC5B,WAAW,EAAE,SAAS;CACd,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU;mBACf,YAAY;;+BAtDJ,SAAS;8BACV,SAAS;+BACR,SAAS;6BACX,SAAS;kCACJ,SAAS;kCACT,SAAS;iCACV,SAAS;iCACT,SAAS;0CACA,SAAS;yCACV,SAAS;uCACX,SAAS;mCAIb,SAAS;mCACT,SAAS;qCACP,SAAS;+CAIC,SAAS;qCACnB,SAAS;4CACF,SAAS;qCAChB,SAAS;0CACJ,SAAS;yCACV,SAAS;6BAIrB,SAAS;6BACT,SAAS;kCACJ,SAAS;mCACR,SAAS;mCACT,SAAS;mCACT,SAAS;mCACT,SAAS;oCACR,SAAS;mCACV,SAAS;oCACR,SAAS;8BACf,SAAS;;;4BAkBP,YAAY;CACoB,CAAC"}
|
|
@@ -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,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ize } 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
|
|
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 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, US military identity colors, Werner, Pokemon); fully typed, tree-shakeable, perceptual color distance (CIEDE2000 / OKLAB).",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"color",
|
|
6
6
|
"colors",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"author": "the-simian <info@simiancraft.com>",
|
|
35
35
|
"license": "MIT",
|
|
36
|
-
"version": "3.
|
|
36
|
+
"version": "3.8.0",
|
|
37
37
|
"homepage": "https://github.com/simiancraft/chromonym#readme",
|
|
38
38
|
"repository": {
|
|
39
39
|
"type": "git",
|
|
@@ -118,6 +118,11 @@
|
|
|
118
118
|
"import": "./dist/palettes/milStd2525d.js",
|
|
119
119
|
"default": "./dist/palettes/milStd2525d.js"
|
|
120
120
|
},
|
|
121
|
+
"./us-military": {
|
|
122
|
+
"types": "./dist/palettes/usMilitary.d.ts",
|
|
123
|
+
"import": "./dist/palettes/usMilitary.js",
|
|
124
|
+
"default": "./dist/palettes/usMilitary.js"
|
|
125
|
+
},
|
|
121
126
|
"./nbs": {
|
|
122
127
|
"types": "./dist/palettes/nbs.d.ts",
|
|
123
128
|
"import": "./dist/palettes/nbs.js",
|