chromonym 3.6.0 → 3.7.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 CHANGED
@@ -99,6 +99,26 @@ the Apache License 2.0. The palette is provided as a nominative reference to
99
99
  the published tokens, not as an imitation of, or substitute for, Material
100
100
  Design tooling.
101
101
 
102
+ ## U.S. Web Design System (USWDS)
103
+
104
+ The `uswds` palette (461 entries) ships the **system color tokens** of
105
+ the [U.S. Web Design System](https://designsystem.digital.gov/), the
106
+ design system the US General Services Administration maintains for
107
+ federal websites, from `packages/uswds-tokens/colors/*.json` at tag
108
+ `v3.14.0` of <https://github.com/uswds/uswds> (identical to the SCSS
109
+ token maps in `packages/uswds-core`).
110
+
111
+ - USWDS's own code and design tokens are a US Government work, not
112
+ subject to copyright in the United States, and GSA waives copyright
113
+ worldwide under the **CC0 1.0 Universal** public domain dedication.
114
+ (The fonts and icons USWDS bundles carry other licenses; the palette
115
+ uses none of them.)
116
+ - Keys are the USWDS token names verbatim (`blue-60v`,
117
+ `gray-cool-30`). Black, white, and transparent are USWDS global
118
+ tokens outside the system palette and are not included.
119
+ - Chromonym is **not affiliated with** GSA or any US Government
120
+ agency; no endorsement is implied.
121
+
102
122
  ## CSS / SVG named colors
103
123
 
104
124
  The `web` palette mirrors the CSS Color Module Level 4 named-color
@@ -282,6 +302,23 @@ subject to copyright restrictions when faithfully reproduced.
282
302
  - Chromonym is **not affiliated with** any US Government agency
283
303
  or defense contractor; no endorsement is implied.
284
304
 
305
+ ## MIL-STD-2525D (Joint Military Symbology)
306
+
307
+ The `milStd2525d` palette (20 entries) reproduces the symbol colors in
308
+ **MIL-STD-2525D, *Joint Military Symbology*** (US Department of
309
+ Defense, 10 June 2014): Table XV, "Color range values for filled
310
+ symbols" (a dark, medium, and light fill for each standard identity),
311
+ and Table XVI, "Default colors for unfilled symbols". The standard
312
+ prints each color as an RGB triplet; the palette converts those to hex
313
+ and changes nothing else.
314
+
315
+ - The standard is a US Government work marked **Distribution A:
316
+ approved for public release, distribution is unlimited**.
317
+ - MIL-STD-2525E (2022) supersedes 2525D and may revise these colors;
318
+ the palette is pinned to 2525D.
319
+ - Chromonym is **not affiliated with** the Department of Defense; no
320
+ endorsement is implied.
321
+
285
322
  ## XKCD color survey
286
323
 
287
324
  The `xkcd` palette (923 entries after normalization-collision
package/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
  <code>identify</code> &nbsp;•&nbsp; <code>resolve</code> &nbsp;•&nbsp; <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 seventeen palettes out of the box (CSS, X11, Pantone, Crayola, NTC, XKCD, RAL, Tailwind, Material, Resene, NCS, ISCC-NBS, NBS, FS 595 B, FS 595 C, 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.
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 nineteen 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, 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
 
@@ -298,7 +298,7 @@ Tailwind v3 exports nested hex scales such as `{ red: { 500: '#ef4444' } }`. Fla
298
298
 
299
299
  ```ts
300
300
  import { defineColorPalette, identify } from 'chromonym';
301
- import tailwindColors = require('tailwindcss/colors');
301
+ import tailwindColors from 'tailwindcss/colors.js';
302
302
 
303
303
  function flattenTailwindColors(colors: object) {
304
304
  const flat: Record<string, `#${string}`> = {};
@@ -343,13 +343,13 @@ identify('#ef4444', { palette: tailwindV3 })
343
343
  // → 'red-500'
344
344
  ```
345
345
 
346
- `deltaEok` is a good default for design-system matching because Tailwind's shade ramps are perceptual. The skipped Tailwind v3 aliases duplicate newer color families, and reading their getters emits runtime warnings. The TypeScript `require` import also avoids Bun's static-import interop reading those getters before `flattenTailwindColors` can skip them. Tailwind v4's raw theme values use OKLCH, which `defineColorPalette` does not parse; use the built-in `tailwind` palette or convert custom v4 values to hex first.
346
+ `deltaEok` is a good default for design-system matching because Tailwind's shade ramps are perceptual. The skipped Tailwind v3 aliases duplicate newer color families, and reading their getters emits runtime warnings. Under Bun, the default import reads those getters before `flattenTailwindColors` can skip them, so it prints harmless rename warnings. Tailwind v4's raw theme values use OKLCH, which `defineColorPalette` does not parse; use the built-in `tailwind` palette or convert custom v4 values to hex first.
347
347
 
348
348
  Unparseable values are dropped with a `console.warn` naming the palette, the offending key, and the bad value; the rest of the palette loads normally. This keeps a single typo out of your brand kit from taking down the whole module.
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 seventeen we ship
352
+ ### The nineteen we ship
353
353
 
354
354
  | Name | Entries | Source |
355
355
  |---|---|---|
@@ -361,6 +361,7 @@ If you prefer zero runtime and already have hex-only values, the `as const satis
361
361
  | `xkcd` | 923 | XKCD 2010 color-survey results (CC0; crowd-sourced common-speech names) |
362
362
  | `fs595b` | 209 | Federal Standard 595B paint chips (1989 revision; modelers / historical equipment) |
363
363
  | `fs595c` | 589 | Federal Standard 595C paint chips (US Government spec; military / aviation coatings) |
364
+ | `milStd2525d` | 20 | MIL-STD-2525D military symbology colors: hostile, friend, neutral, unknown, and civilian, in dark, medium, light, and unfilled |
364
365
  | `isccNbs` | 260 | ISCC-NBS Method of Designating Colors (1955 US standard; Munsell-partitioned named blocks) |
365
366
  | `nbs` | 267 | Second digitization of the same 1955 standard; different sRGB (matches 1955 chip book; covers the 7 blocks `isccNbs` leaves as gaps) |
366
367
  | `resene` | 1378 | Resene Paints (NZ) catalog; te reo Māori and NZ place-names in the naming |
@@ -368,6 +369,7 @@ If you prefer zero runtime and already have hex-only values, the `as const satis
368
369
  | `ral` | 216 | RAL Classic, the European industrial coatings standard (community sRGB values; not a licensed RAL product) |
369
370
  | `tailwind` | 242 | Tailwind CSS v4 default theme (22 families × 11 shades, computed from the OKLCH spec) |
370
371
  | `material` | 98 | Material Design 3 baseline system color roles (49 each for light and dark schemes) |
372
+ | `uswds` | 461 | U.S. Web Design System system color tokens (`blue-60v`, `gray-cool-30`); the federal web palette, public domain |
371
373
  | `werner` | 110 | Werner's Nomenclature of Colours (1821, Patrick Syme; the field reference Darwin carried aboard the Beagle) |
372
374
  | `pokemon` | 18 | Pokémon type-badge colors (community approximations; not an official asset set) |
373
375
 
@@ -518,7 +520,7 @@ const tryConvert = (input: ColorInput, opts = {}) => {
518
520
 
519
521
  **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.
520
522
 
521
- The published tarball is **~2.7 MB unpacked / ~600 kB gzipped** because it carries seventeen palettes and ~9600 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`:
523
+ The published tarball is **~2.4 MB unpacked / ~530 kB gzipped** because it carries nineteen palettes and ~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`:
522
524
 
523
525
  | Import | min | gzip |
524
526
  |---|---|---|
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export { type Fs595bColorName, fs595b } from './palettes/fs595b.js';
13
13
  export { type Fs595cColorName, fs595c } from './palettes/fs595c.js';
14
14
  export { type IsccNbsColorName, isccNbs } from './palettes/isccNbs.js';
15
15
  export { type MaterialColorName, material } from './palettes/material.js';
16
+ export { type MilStd2525dColorName, milStd2525d } from './palettes/milStd2525d.js';
16
17
  export { type NbsColorName, nbs } from './palettes/nbs.js';
17
18
  export { type NcsColorName, ncs } from './palettes/ncs.js';
18
19
  export { type NtcColorName, ntc } from './palettes/ntc.js';
@@ -21,6 +22,7 @@ export { type PokemonColorName, pokemon } from './palettes/pokemon.js';
21
22
  export { type RalColorName, ral } from './palettes/ral.js';
22
23
  export { type ReseneColorName, resene } from './palettes/resene.js';
23
24
  export { type TailwindColorName, tailwind } from './palettes/tailwind.js';
25
+ export { type UswdsColorName, uswds } from './palettes/uswds.js';
24
26
  export { type WebColorName, web } from './palettes/web.js';
25
27
  export { type WernerColorName, werner } from './palettes/werner.js';
26
28
  export { type X11ColorName, x11 } from './palettes/x11.js';
@@ -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,EA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AAK,EAAE,MAAM,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
@@ -16,6 +16,7 @@ export { fs595b } from './palettes/fs595b.js';
16
16
  export { fs595c } from './palettes/fs595c.js';
17
17
  export { isccNbs } from './palettes/isccNbs.js';
18
18
  export { material } from './palettes/material.js';
19
+ export { milStd2525d } from './palettes/milStd2525d.js';
19
20
  export { nbs } from './palettes/nbs.js';
20
21
  export { ncs } from './palettes/ncs.js';
21
22
  export { ntc } from './palettes/ntc.js';
@@ -24,6 +25,7 @@ export { pokemon } from './palettes/pokemon.js';
24
25
  export { ral } from './palettes/ral.js';
25
26
  export { resene } from './palettes/resene.js';
26
27
  export { tailwind } from './palettes/tailwind.js';
28
+ export { uswds } from './palettes/uswds.js';
27
29
  export { web } from './palettes/web.js';
28
30
  export { werner } from './palettes/werner.js';
29
31
  export { x11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AM,mBAAmB,CAAC;AAC3D,OAAO,EAAyB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAyB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAqB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAwB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAA0B,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC1E,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 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 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,CAA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B,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"]}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * MIL-STD-2525D (Joint Military Symbology, 10 June 2014) symbol colors.
3
+ *
4
+ * The US Department of Defense standard for the symbols command-and-control
5
+ * systems draw: units, equipment, and tracks, colored by standard identity
6
+ * (whether the thing is hostile, friend, neutral, unknown, or civilian).
7
+ *
8
+ * - Table XV, "Color range values for filled symbols": a dark, medium, and
9
+ * light fill per identity. The standard lets implementers use any of the
10
+ * three sets, or another set whose luminance falls between dark and
11
+ * light, and keeps the hue fixed per identity.
12
+ * - Table XVI, "Default colors for unfilled symbols": one frame and icon
13
+ * color per identity (red, cyan, neon green, yellow, magenta).
14
+ *
15
+ * Keys are the identity and shade: `'Hostile Medium'`, `'Friend Light'`,
16
+ * `'Neutral Unfilled'`. Each identity row also covers its kin from the
17
+ * table: hostile includes suspect, joker, and faker; friend includes
18
+ * assumed friend; unknown includes pending; civilian is the optional fill.
19
+ * `'Unknown Medium'` and `'Unknown Unfilled'` share `#ffff00`; `identify`
20
+ * returns `'Unknown Medium'`, the first in insertion order.
21
+ *
22
+ * Values are the RGB triplets the standard prints, converted to hex.
23
+ * MIL-STD-2525D is a US Government work, approved for public release
24
+ * (Distribution A). MIL-STD-2525E (2022) supersedes it and may revise
25
+ * these colors; this palette is pinned to 2525D. See NOTICE.md.
26
+ *
27
+ * Default metric: `'deltaE2000'`; the three shades of each hue sit close
28
+ * enough that the most perceptually faithful standard ΔE is worth its
29
+ * negligible cost at 20 entries.
30
+ */
31
+ declare const milStd2525dColors: {
32
+ readonly 'Hostile Dark': '#c80000';
33
+ readonly 'Hostile Medium': '#ff3031';
34
+ readonly 'Hostile Light': '#ff8080';
35
+ readonly 'Friend Dark': '#006b8c';
36
+ readonly 'Friend Medium': '#00a8dc';
37
+ readonly 'Friend Light': '#80e0ff';
38
+ readonly 'Neutral Dark': '#00a000';
39
+ readonly 'Neutral Medium': '#00e200';
40
+ readonly 'Neutral Light': '#aaffaa';
41
+ readonly 'Unknown Dark': '#e1dc00';
42
+ readonly 'Unknown Medium': '#ffff00';
43
+ readonly 'Unknown Light': '#ffff80';
44
+ readonly 'Civilian Dark': '#500050';
45
+ readonly 'Civilian Medium': '#800080';
46
+ readonly 'Civilian Light': '#ffa1ff';
47
+ readonly 'Hostile Unfilled': '#ff0000';
48
+ readonly 'Friend Unfilled': '#00ffff';
49
+ readonly 'Neutral Unfilled': '#00ff00';
50
+ readonly 'Unknown Unfilled': '#ffff00';
51
+ readonly 'Civilian Unfilled': '#ff00ff';
52
+ };
53
+ export type MilStd2525dColorName = keyof typeof milStd2525dColors;
54
+ /**
55
+ * MIL-STD-2525D symbol colors as a `Palette<MilStd2525dColorName>`. Keys
56
+ * are identity plus shade (`'Friend Medium'`); the standard normalizer
57
+ * accepts any case and punctuation.
58
+ *
59
+ * @example
60
+ * identify('#00a8dc', { palette: milStd2525d }); // 'Friend Medium'
61
+ * resolve('hostile light', { palette: milStd2525d }); // '#ff8080'
62
+ * milStd2525d.colors['Civilian Unfilled']; // '#ff00ff'
63
+ */
64
+ export declare const milStd2525d: {
65
+ readonly name: 'milStd2525d';
66
+ readonly colors: {
67
+ readonly 'Hostile Dark': '#c80000';
68
+ readonly 'Hostile Medium': '#ff3031';
69
+ readonly 'Hostile Light': '#ff8080';
70
+ readonly 'Friend Dark': '#006b8c';
71
+ readonly 'Friend Medium': '#00a8dc';
72
+ readonly 'Friend Light': '#80e0ff';
73
+ readonly 'Neutral Dark': '#00a000';
74
+ readonly 'Neutral Medium': '#00e200';
75
+ readonly 'Neutral Light': '#aaffaa';
76
+ readonly 'Unknown Dark': '#e1dc00';
77
+ readonly 'Unknown Medium': '#ffff00';
78
+ readonly 'Unknown Light': '#ffff80';
79
+ readonly 'Civilian Dark': '#500050';
80
+ readonly 'Civilian Medium': '#800080';
81
+ readonly 'Civilian Light': '#ffa1ff';
82
+ readonly 'Hostile Unfilled': '#ff0000';
83
+ readonly 'Friend Unfilled': '#00ffff';
84
+ readonly 'Neutral Unfilled': '#00ff00';
85
+ readonly 'Unknown Unfilled': '#ffff00';
86
+ readonly 'Civilian Unfilled': '#ff00ff';
87
+ };
88
+ readonly normalize: import("../types.js").NormalizeFn;
89
+ readonly defaultMetric: 'deltaE2000';
90
+ };
91
+ export {};
92
+ //# sourceMappingURL=milStd2525d.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"milStd2525d.d.ts","sourceRoot":"","sources":["../../src/palettes/milStd2525d.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,iBAAiB;aAErB,cAAc,EAAE,SAAS;aACzB,gBAAgB,EAAE,SAAS;aAC3B,eAAe,EAAE,SAAS;aAC1B,aAAa,EAAE,SAAS;aACxB,eAAe,EAAE,SAAS;aAC1B,cAAc,EAAE,SAAS;aACzB,cAAc,EAAE,SAAS;aACzB,gBAAgB,EAAE,SAAS;aAC3B,eAAe,EAAE,SAAS;aAC1B,cAAc,EAAE,SAAS;aACzB,gBAAgB,EAAE,SAAS;aAC3B,eAAe,EAAE,SAAS;aAC1B,eAAe,EAAE,SAAS;aAC1B,iBAAiB,EAAE,SAAS;aAC5B,gBAAgB,EAAE,SAAS;aAG3B,kBAAkB,EAAE,SAAS;aAC7B,iBAAiB,EAAE,SAAS;aAC5B,kBAAkB,EAAE,SAAS;aAC7B,kBAAkB,EAAE,SAAS;aAC7B,mBAAmB,EAAE,SAAS;CACtB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAElE;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW;mBAChB,aAAa;;iCArCH,SAAS;mCACP,SAAS;kCACV,SAAS;gCACX,SAAS;kCACP,SAAS;iCACV,SAAS;iCACT,SAAS;mCACP,SAAS;kCACV,SAAS;iCACV,SAAS;mCACP,SAAS;kCACV,SAAS;kCACT,SAAS;oCACP,SAAS;mCACV,SAAS;qCAGP,SAAS;oCACV,SAAS;qCACR,SAAS;qCACT,SAAS;sCACR,SAAS;;;4BAmBf,YAAY;CACqB,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { standardNormalize } from './normalize.js';
2
+ /**
3
+ * MIL-STD-2525D (Joint Military Symbology, 10 June 2014) symbol colors.
4
+ *
5
+ * The US Department of Defense standard for the symbols command-and-control
6
+ * systems draw: units, equipment, and tracks, colored by standard identity
7
+ * (whether the thing is hostile, friend, neutral, unknown, or civilian).
8
+ *
9
+ * - Table XV, "Color range values for filled symbols": a dark, medium, and
10
+ * light fill per identity. The standard lets implementers use any of the
11
+ * three sets, or another set whose luminance falls between dark and
12
+ * light, and keeps the hue fixed per identity.
13
+ * - Table XVI, "Default colors for unfilled symbols": one frame and icon
14
+ * color per identity (red, cyan, neon green, yellow, magenta).
15
+ *
16
+ * Keys are the identity and shade: `'Hostile Medium'`, `'Friend Light'`,
17
+ * `'Neutral Unfilled'`. Each identity row also covers its kin from the
18
+ * table: hostile includes suspect, joker, and faker; friend includes
19
+ * assumed friend; unknown includes pending; civilian is the optional fill.
20
+ * `'Unknown Medium'` and `'Unknown Unfilled'` share `#ffff00`; `identify`
21
+ * returns `'Unknown Medium'`, the first in insertion order.
22
+ *
23
+ * Values are the RGB triplets the standard prints, converted to hex.
24
+ * MIL-STD-2525D is a US Government work, approved for public release
25
+ * (Distribution A). MIL-STD-2525E (2022) supersedes it and may revise
26
+ * these colors; this palette is pinned to 2525D. See NOTICE.md.
27
+ *
28
+ * Default metric: `'deltaE2000'`; the three shades of each hue sit close
29
+ * enough that the most perceptually faithful standard ΔE is worth its
30
+ * negligible cost at 20 entries.
31
+ */
32
+ const milStd2525dColors = {
33
+ // --- Table XV: filled symbols (dark, medium, light) ---
34
+ 'Hostile Dark': '#c80000',
35
+ 'Hostile Medium': '#ff3031',
36
+ 'Hostile Light': '#ff8080',
37
+ 'Friend Dark': '#006b8c',
38
+ 'Friend Medium': '#00a8dc',
39
+ 'Friend Light': '#80e0ff',
40
+ 'Neutral Dark': '#00a000',
41
+ 'Neutral Medium': '#00e200',
42
+ 'Neutral Light': '#aaffaa',
43
+ 'Unknown Dark': '#e1dc00',
44
+ 'Unknown Medium': '#ffff00',
45
+ 'Unknown Light': '#ffff80',
46
+ 'Civilian Dark': '#500050',
47
+ 'Civilian Medium': '#800080',
48
+ 'Civilian Light': '#ffa1ff',
49
+ // --- Table XVI: unfilled symbols ---
50
+ 'Hostile Unfilled': '#ff0000',
51
+ 'Friend Unfilled': '#00ffff',
52
+ 'Neutral Unfilled': '#00ff00',
53
+ 'Unknown Unfilled': '#ffff00',
54
+ 'Civilian Unfilled': '#ff00ff',
55
+ };
56
+ /**
57
+ * MIL-STD-2525D symbol colors as a `Palette<MilStd2525dColorName>`. Keys
58
+ * are identity plus shade (`'Friend Medium'`); the standard normalizer
59
+ * accepts any case and punctuation.
60
+ *
61
+ * @example
62
+ * identify('#00a8dc', { palette: milStd2525d }); // 'Friend Medium'
63
+ * resolve('hostile light', { palette: milStd2525d }); // '#ff8080'
64
+ * milStd2525d.colors['Civilian Unfilled']; // '#ff00ff'
65
+ */
66
+ export const milStd2525d = {
67
+ name: 'milStd2525d',
68
+ colors: milStd2525dColors,
69
+ normalize: standardNormalize,
70
+ defaultMetric: 'deltaE2000',
71
+ };
72
+ //# sourceMappingURL=milStd2525d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"milStd2525d.js","sourceRoot":"","sources":["../../src/palettes/milStd2525d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,iBAAiB,GAAG;IACxB,yDAAyD;IACzD,cAAc,EAAE,SAAS;IACzB,gBAAgB,EAAE,SAAS;IAC3B,eAAe,EAAE,SAAS;IAC1B,aAAa,EAAE,SAAS;IACxB,eAAe,EAAE,SAAS;IAC1B,cAAc,EAAE,SAAS;IACzB,cAAc,EAAE,SAAS;IACzB,gBAAgB,EAAE,SAAS;IAC3B,eAAe,EAAE,SAAS;IAC1B,cAAc,EAAE,SAAS;IACzB,gBAAgB,EAAE,SAAS;IAC3B,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,SAAS;IAC1B,iBAAiB,EAAE,SAAS;IAC5B,gBAAgB,EAAE,SAAS;IAE3B,sCAAsC;IACtC,kBAAkB,EAAE,SAAS;IAC7B,iBAAiB,EAAE,SAAS;IAC5B,kBAAkB,EAAE,SAAS;IAC7B,kBAAkB,EAAE,SAAS;IAC7B,mBAAmB,EAAE,SAAS;CACtB,CAAC;AAIX;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,aAAa;IACnB,MAAM,EAAE,iBAAiB;IACzB,SAAS,EAAE,iBAAiB;IAC5B,aAAa,EAAE,YAAY;CACqB,CAAC","sourcesContent":["import type { Palette } from '../types.js';\nimport { standardNormalize } from './normalize.js';\n\n/**\n * MIL-STD-2525D (Joint Military Symbology, 10 June 2014) symbol colors.\n *\n * The US Department of Defense standard for the symbols command-and-control\n * systems draw: units, equipment, and tracks, colored by standard identity\n * (whether the thing is hostile, friend, neutral, unknown, or civilian).\n *\n * - Table XV, \"Color range values for filled symbols\": a dark, medium, and\n * light fill per identity. The standard lets implementers use any of the\n * three sets, or another set whose luminance falls between dark and\n * light, and keeps the hue fixed per identity.\n * - Table XVI, \"Default colors for unfilled symbols\": one frame and icon\n * color per identity (red, cyan, neon green, yellow, magenta).\n *\n * Keys are the identity and shade: `'Hostile Medium'`, `'Friend Light'`,\n * `'Neutral Unfilled'`. Each identity row also covers its kin from the\n * table: hostile includes suspect, joker, and faker; friend includes\n * assumed friend; unknown includes pending; civilian is the optional fill.\n * `'Unknown Medium'` and `'Unknown Unfilled'` share `#ffff00`; `identify`\n * returns `'Unknown Medium'`, the first in insertion order.\n *\n * Values are the RGB triplets the standard prints, converted to hex.\n * MIL-STD-2525D is a US Government work, approved for public release\n * (Distribution A). MIL-STD-2525E (2022) supersedes it and may revise\n * these colors; this palette is pinned to 2525D. See NOTICE.md.\n *\n * Default metric: `'deltaE2000'`; the three shades of each hue sit close\n * enough that the most perceptually faithful standard ΔE is worth its\n * negligible cost at 20 entries.\n */\nconst milStd2525dColors = {\n // --- Table XV: filled symbols (dark, medium, light) ---\n 'Hostile Dark': '#c80000',\n 'Hostile Medium': '#ff3031',\n 'Hostile Light': '#ff8080',\n 'Friend Dark': '#006b8c',\n 'Friend Medium': '#00a8dc',\n 'Friend Light': '#80e0ff',\n 'Neutral Dark': '#00a000',\n 'Neutral Medium': '#00e200',\n 'Neutral Light': '#aaffaa',\n 'Unknown Dark': '#e1dc00',\n 'Unknown Medium': '#ffff00',\n 'Unknown Light': '#ffff80',\n 'Civilian Dark': '#500050',\n 'Civilian Medium': '#800080',\n 'Civilian Light': '#ffa1ff',\n\n // --- Table XVI: unfilled symbols ---\n 'Hostile Unfilled': '#ff0000',\n 'Friend Unfilled': '#00ffff',\n 'Neutral Unfilled': '#00ff00',\n 'Unknown Unfilled': '#ffff00',\n 'Civilian Unfilled': '#ff00ff',\n} as const;\n\nexport type MilStd2525dColorName = keyof typeof milStd2525dColors;\n\n/**\n * MIL-STD-2525D symbol colors as a `Palette<MilStd2525dColorName>`. Keys\n * are identity plus shade (`'Friend Medium'`); the standard normalizer\n * accepts any case and punctuation.\n *\n * @example\n * identify('#00a8dc', { palette: milStd2525d }); // 'Friend Medium'\n * resolve('hostile light', { palette: milStd2525d }); // '#ff8080'\n * milStd2525d.colors['Civilian Unfilled']; // '#ff00ff'\n */\nexport const milStd2525d = {\n name: 'milStd2525d',\n colors: milStd2525dColors,\n normalize: standardNormalize,\n defaultMetric: 'deltaE2000',\n} as const satisfies Palette<MilStd2525dColorName>;\n"]}