chromonym 3.3.2 → 3.5.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 +75 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/palettes/pokemon.d.ts +81 -0
- package/dist/palettes/pokemon.d.ts.map +1 -0
- package/dist/palettes/pokemon.js +64 -0
- package/dist/palettes/pokemon.js.map +1 -0
- package/dist/palettes/ral.d.ts +480 -0
- package/dist/palettes/ral.d.ts.map +1 -0
- package/dist/palettes/ral.js +271 -0
- package/dist/palettes/ral.js.map +1 -0
- package/dist/palettes/tailwind.d.ts +539 -0
- package/dist/palettes/tailwind.d.ts.map +1 -0
- package/dist/palettes/tailwind.js +317 -0
- package/dist/palettes/tailwind.js.map +1 -0
- package/dist/palettes/werner.d.ts +270 -0
- package/dist/palettes/werner.d.ts.map +1 -0
- package/dist/palettes/werner.js +168 -0
- package/dist/palettes/werner.js.map +1 -0
- package/package.json +31 -7
package/NOTICE.md
CHANGED
|
@@ -313,6 +313,81 @@ terms allowing free reuse with attribution. If the upstream author
|
|
|
313
313
|
objects to Chromonym's inclusion of the list, open an issue and we
|
|
314
314
|
will revisit.
|
|
315
315
|
|
|
316
|
+
## RAL®
|
|
317
|
+
|
|
318
|
+
**RAL®** is a registered trademark of **RAL gGmbH** (Bonn, Germany).
|
|
319
|
+
Chromonym is **not affiliated with, endorsed by, licensed by, or
|
|
320
|
+
certified by RAL gGmbH**.
|
|
321
|
+
|
|
322
|
+
The `ral` palette ships the RAL Classic set (216 entries spanning
|
|
323
|
+
RAL 1000 through RAL 9023) as a nominative reference to publicly
|
|
324
|
+
identified RAL color codes. sRGB hex values are derived from the
|
|
325
|
+
**MIT-licensed `JohannesVoigt/ral-color-converter` dataset**
|
|
326
|
+
(<https://github.com/JohannesVoigt/ral-color-converter>), which ships
|
|
327
|
+
the Classic set with multi-language names, CMYK, and LRV companions.
|
|
328
|
+
|
|
329
|
+
The values are community-cited approximations and will not match a
|
|
330
|
+
licensed RAL reference (physical RAL K7 fan deck, RAL Digital, or the
|
|
331
|
+
RAL Connect SDK) exactly. They are intended for on-screen reference,
|
|
332
|
+
nearest-name identification, and general tooling — **not for paint
|
|
333
|
+
formulation, coating specification, or industrial color matching**.
|
|
334
|
+
For RAL-certified values, consult RAL directly:
|
|
335
|
+
<https://www.ral-farben.de/en/>.
|
|
336
|
+
|
|
337
|
+
## Tailwind CSS
|
|
338
|
+
|
|
339
|
+
**Tailwind CSS** is licensed under the **MIT License**, © Tailwind Labs,
|
|
340
|
+
Inc. The `tailwind` palette ships the default theme of **Tailwind CSS
|
|
341
|
+
v4.0** (22 color families × 11 shades = 242 entries).
|
|
342
|
+
|
|
343
|
+
The v4.0 default theme is defined in OKLCH (Tailwind v4 shipped its
|
|
344
|
+
first OKLCH-native theme; earlier versions used hex). This palette
|
|
345
|
+
converts those OKLCH values to sRGB hex via Björn Ottosson's reference
|
|
346
|
+
OKLAB→linear sRGB matrix and the standard IEC 61966-2-1 sRGB transfer
|
|
347
|
+
function. Out-of-sRGB-gamut OKLCH values (notably some saturated
|
|
348
|
+
500-600 shades) are clamped to [0, 1] before encoding; the visible
|
|
349
|
+
result in a wide-gamut browser will differ from the sRGB hex shipped
|
|
350
|
+
here.
|
|
351
|
+
|
|
352
|
+
Tailwind v4.2+ adds families (mauve, olive, mist, taupe) that are
|
|
353
|
+
intentionally not included; this palette is pinned to v4.0 per the
|
|
354
|
+
shipping intent. A future palette bump may track later v4.x defaults.
|
|
355
|
+
|
|
356
|
+
Tailwind documentation: <https://tailwindcss.com/docs/colors>.
|
|
357
|
+
|
|
358
|
+
## Werner's Nomenclature of Colours
|
|
359
|
+
|
|
360
|
+
The `werner` palette ships the 110 named pigments from **Werner's
|
|
361
|
+
Nomenclature of Colours** (1821), Patrick Syme's adaptation of Abraham
|
|
362
|
+
Werner's mineralogical color system. The original 1821 text is public
|
|
363
|
+
domain.
|
|
364
|
+
|
|
365
|
+
The sRGB hex values were sampled from physical chip swatches by
|
|
366
|
+
**Nicholas Rougeux** and published at
|
|
367
|
+
[www.c82.net/werner/](https://www.c82.net/werner/) under
|
|
368
|
+
**CC BY 4.0** (Creative Commons Attribution 4.0 International). This
|
|
369
|
+
palette redistributes those values with attribution under the same
|
|
370
|
+
license. If you redistribute the `werner` palette downstream, preserve
|
|
371
|
+
this attribution.
|
|
372
|
+
|
|
373
|
+
The 1821 names are used as nominative references to publicly identified
|
|
374
|
+
historical pigments; no endorsement is implied.
|
|
375
|
+
|
|
376
|
+
## Pokémon™
|
|
377
|
+
|
|
378
|
+
**Pokémon™** is a trademark of **Nintendo, Game Freak, and The Pokémon
|
|
379
|
+
Company**. Chromonym is **not affiliated with, endorsed by, licensed
|
|
380
|
+
by, or certified by** any of those entities.
|
|
381
|
+
|
|
382
|
+
The `pokemon` palette ships sRGB approximations of the 18 canonical
|
|
383
|
+
type-badge colors (Normal through Fairy) as documented on
|
|
384
|
+
[Bulbapedia](https://bulbapedia.bulbagarden.net/wiki/Type), which itself
|
|
385
|
+
sources from in-game asset extraction. The type names are used as
|
|
386
|
+
**nominative references** to publicly identified Pokémon type symbols;
|
|
387
|
+
no endorsement, asset-license, or trademark claim is implied. Hex
|
|
388
|
+
values are community-cited approximations, not extracted production
|
|
389
|
+
assets.
|
|
390
|
+
|
|
316
391
|
## Bauhaus Modern (demo site typeface)
|
|
317
392
|
|
|
318
393
|
The demo site at <https://simiancraft.github.io/chromonym/> embeds
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const VERSION: string;
|
|
1
2
|
export { hexToRgba, rgbaToHex } from './conversions/hex.js';
|
|
2
3
|
export { hslToRgba, rgbaToHsl } from './conversions/hsl.js';
|
|
3
4
|
export { hsvToRgba, rgbaToHsv } from './conversions/hsv.js';
|
|
@@ -15,8 +16,12 @@ export { type NbsColorName, nbs } from './palettes/nbs.js';
|
|
|
15
16
|
export { type NcsColorName, ncs } from './palettes/ncs.js';
|
|
16
17
|
export { type NtcColorName, ntc } from './palettes/ntc.js';
|
|
17
18
|
export { type PantoneColorName, pantone } from './palettes/pantone.js';
|
|
19
|
+
export { type PokemonColorName, pokemon } from './palettes/pokemon.js';
|
|
20
|
+
export { type RalColorName, ral } from './palettes/ral.js';
|
|
18
21
|
export { type ReseneColorName, resene } from './palettes/resene.js';
|
|
22
|
+
export { type TailwindColorName, tailwind } from './palettes/tailwind.js';
|
|
19
23
|
export { type WebColorName, web } from './palettes/web.js';
|
|
24
|
+
export { type WernerColorName, werner } from './palettes/werner.js';
|
|
20
25
|
export { type X11ColorName, x11 } from './palettes/x11.js';
|
|
21
26
|
export { type XkcdColorName, xkcd } from './palettes/xkcd.js';
|
|
22
27
|
export { type ResolveFuzzyOptions, type ResolveMatch, type ResolveOptions, resolve, } from './resolve.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
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,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,KAAK,YAAY,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,KAAK,YAAY,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvE,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,iBAAiB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC1E,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","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 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"]}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
// Public API barrel
|
|
1
|
+
// Public API barrel; explicit named re-exports only (tree-shake friendly).
|
|
2
2
|
// No default export; no side effects at module scope.
|
|
3
|
+
import pkg from '../package.json' with { type: 'json' };
|
|
4
|
+
export const VERSION = pkg.version;
|
|
3
5
|
export { hexToRgba, rgbaToHex } from './conversions/hex.js';
|
|
4
6
|
export { hslToRgba, rgbaToHsl } from './conversions/hsl.js';
|
|
5
7
|
export { hsvToRgba, rgbaToHsv } from './conversions/hsv.js';
|
|
@@ -17,8 +19,12 @@ export { nbs } from './palettes/nbs.js';
|
|
|
17
19
|
export { ncs } from './palettes/ncs.js';
|
|
18
20
|
export { ntc } from './palettes/ntc.js';
|
|
19
21
|
export { pantone } from './palettes/pantone.js';
|
|
22
|
+
export { pokemon } from './palettes/pokemon.js';
|
|
23
|
+
export { ral } from './palettes/ral.js';
|
|
20
24
|
export { resene } from './palettes/resene.js';
|
|
25
|
+
export { tailwind } from './palettes/tailwind.js';
|
|
21
26
|
export { web } from './palettes/web.js';
|
|
27
|
+
export { werner } from './palettes/werner.js';
|
|
22
28
|
export { x11 } from './palettes/x11.js';
|
|
23
29
|
export { xkcd } from './palettes/xkcd.js';
|
|
24
30
|
export { resolve, } from './resolve.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
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;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,EAIL,OAAO,EACP,QAAQ,EACR,MAAM,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAuB,YAAY,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAIL,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAyB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAwB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAwB,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAyB,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAqB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAqB,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAqB,GAAG,EAAE,MAAM,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 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"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pokémon type colors — the 18 canonical type symbols as displayed on
|
|
3
|
+
* type badges in modern Pokémon media.
|
|
4
|
+
*
|
|
5
|
+
* Keys are Title Case singular ('Fire', 'Water', 'Grass'), matching the
|
|
6
|
+
* in-game spelling. `standardNormalize` strips case and punctuation, so
|
|
7
|
+
* `resolve('fire')`, `resolve('FIRE')`, and `resolve('Fire')` all hit
|
|
8
|
+
* the same entry.
|
|
9
|
+
*
|
|
10
|
+
* sRGB values are community-cited approximations of the type-badge
|
|
11
|
+
* colors documented on Bulbapedia
|
|
12
|
+
* (https://bulbapedia.bulbagarden.net/wiki/Type), which itself sources
|
|
13
|
+
* from in-game asset extraction. Pokémon names and the type framework
|
|
14
|
+
* are trademarks of Nintendo, Game Freak, and The Pokémon Company; this
|
|
15
|
+
* palette is a nominative reference, not an official asset set. See
|
|
16
|
+
* NOTICE.md.
|
|
17
|
+
*
|
|
18
|
+
* Default metric: `deltaE76`. The set is tiny (18 entries) and the
|
|
19
|
+
* inter-color distances are large enough that any sensible metric
|
|
20
|
+
* picks the same neighbor; deltaE76 is the cheapest.
|
|
21
|
+
*/
|
|
22
|
+
declare const pokemonColors: {
|
|
23
|
+
readonly Normal: '#a8a77a';
|
|
24
|
+
readonly Fighting: '#c22e28';
|
|
25
|
+
readonly Flying: '#a98ff3';
|
|
26
|
+
readonly Poison: '#a33ea1';
|
|
27
|
+
readonly Ground: '#e2bf65';
|
|
28
|
+
readonly Rock: '#b6a136';
|
|
29
|
+
readonly Bug: '#a6b91a';
|
|
30
|
+
readonly Ghost: '#735797';
|
|
31
|
+
readonly Fire: '#ee8130';
|
|
32
|
+
readonly Water: '#6390f0';
|
|
33
|
+
readonly Grass: '#7ac74c';
|
|
34
|
+
readonly Electric: '#f7d02c';
|
|
35
|
+
readonly Psychic: '#f95587';
|
|
36
|
+
readonly Ice: '#96d9d6';
|
|
37
|
+
readonly Dragon: '#6f35fc';
|
|
38
|
+
readonly Dark: '#705746';
|
|
39
|
+
readonly Steel: '#b7b7ce';
|
|
40
|
+
readonly Fairy: '#d685ad';
|
|
41
|
+
};
|
|
42
|
+
export type PokemonColorName = keyof typeof pokemonColors;
|
|
43
|
+
/**
|
|
44
|
+
* The 18 Pokémon type colors as a `Palette<PokemonColorName>`.
|
|
45
|
+
*
|
|
46
|
+
* Keys are Title Case ('Fire', 'Water'); standard normalizer accepts
|
|
47
|
+
* any case + punctuation variant. Default metric is `'deltaE76'`: the
|
|
48
|
+
* set is small enough that metric choice is academic.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* identify('#ee8130', { palette: pokemon }); // 'Fire'
|
|
52
|
+
* resolve('water', { palette: pokemon }); // '#6390f0'
|
|
53
|
+
* pokemon.colors.Dragon; // '#6f35fc'
|
|
54
|
+
*/
|
|
55
|
+
export declare const pokemon: {
|
|
56
|
+
readonly name: 'pokemon';
|
|
57
|
+
readonly colors: {
|
|
58
|
+
readonly Normal: '#a8a77a';
|
|
59
|
+
readonly Fighting: '#c22e28';
|
|
60
|
+
readonly Flying: '#a98ff3';
|
|
61
|
+
readonly Poison: '#a33ea1';
|
|
62
|
+
readonly Ground: '#e2bf65';
|
|
63
|
+
readonly Rock: '#b6a136';
|
|
64
|
+
readonly Bug: '#a6b91a';
|
|
65
|
+
readonly Ghost: '#735797';
|
|
66
|
+
readonly Fire: '#ee8130';
|
|
67
|
+
readonly Water: '#6390f0';
|
|
68
|
+
readonly Grass: '#7ac74c';
|
|
69
|
+
readonly Electric: '#f7d02c';
|
|
70
|
+
readonly Psychic: '#f95587';
|
|
71
|
+
readonly Ice: '#96d9d6';
|
|
72
|
+
readonly Dragon: '#6f35fc';
|
|
73
|
+
readonly Dark: '#705746';
|
|
74
|
+
readonly Steel: '#b7b7ce';
|
|
75
|
+
readonly Fairy: '#d685ad';
|
|
76
|
+
};
|
|
77
|
+
readonly normalize: import("../types.js").NormalizeFn;
|
|
78
|
+
readonly defaultMetric: 'deltaE76';
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=pokemon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pokemon.d.ts","sourceRoot":"","sources":["../../src/palettes/pokemon.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,aAAa;aAEjB,MAAM,EAAE,SAAS;aACjB,QAAQ,EAAE,SAAS;aACnB,MAAM,EAAE,SAAS;aACjB,MAAM,EAAE,SAAS;aACjB,MAAM,EAAE,SAAS;aACjB,IAAI,EAAE,SAAS;aACf,GAAG,EAAE,SAAS;aACd,KAAK,EAAE,SAAS;aAChB,IAAI,EAAE,SAAS;aACf,KAAK,EAAE,SAAS;aAChB,KAAK,EAAE,SAAS;aAChB,QAAQ,EAAE,SAAS;aACnB,OAAO,EAAE,SAAS;aAClB,GAAG,EAAE,SAAS;aACd,MAAM,EAAE,SAAS;aAGjB,IAAI,EAAE,SAAS;aACf,KAAK,EAAE,SAAS;aAGhB,KAAK,EAAE,SAAS;CACR,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,aAAa,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO;mBACZ,SAAS;;yBAvCP,SAAS;2BACP,SAAS;yBACX,SAAS;yBACT,SAAS;yBACT,SAAS;uBACX,SAAS;sBACV,SAAS;wBACP,SAAS;uBACV,SAAS;wBACR,SAAS;wBACT,SAAS;2BACN,SAAS;0BACV,SAAS;sBACb,SAAS;yBACN,SAAS;uBAGX,SAAS;wBACR,SAAS;wBAGT,SAAS;;;4BAqBD,UAAU;CACmB,CAAC","sourcesContent":["import type { Palette } from '../types.js';\nimport { standardNormalize } from './normalize.js';\n\n/**\n * Pokémon type colors — the 18 canonical type symbols as displayed on\n * type badges in modern Pokémon media.\n *\n * Keys are Title Case singular ('Fire', 'Water', 'Grass'), matching the\n * in-game spelling. `standardNormalize` strips case and punctuation, so\n * `resolve('fire')`, `resolve('FIRE')`, and `resolve('Fire')` all hit\n * the same entry.\n *\n * sRGB values are community-cited approximations of the type-badge\n * colors documented on Bulbapedia\n * (https://bulbapedia.bulbagarden.net/wiki/Type), which itself sources\n * from in-game asset extraction. Pokémon names and the type framework\n * are trademarks of Nintendo, Game Freak, and The Pokémon Company; this\n * palette is a nominative reference, not an official asset set. See\n * NOTICE.md.\n *\n * Default metric: `deltaE76`. The set is tiny (18 entries) and the\n * inter-color distances are large enough that any sensible metric\n * picks the same neighbor; deltaE76 is the cheapest.\n */\nconst pokemonColors = {\n // --- Gen 1 (RGBY) ---\n Normal: '#a8a77a',\n Fighting: '#c22e28',\n Flying: '#a98ff3',\n Poison: '#a33ea1',\n Ground: '#e2bf65',\n Rock: '#b6a136',\n Bug: '#a6b91a',\n Ghost: '#735797',\n Fire: '#ee8130',\n Water: '#6390f0',\n Grass: '#7ac74c',\n Electric: '#f7d02c',\n Psychic: '#f95587',\n Ice: '#96d9d6',\n Dragon: '#6f35fc',\n\n // --- Gen 2 (GSC) ---\n Dark: '#705746',\n Steel: '#b7b7ce',\n\n // --- Gen 6 (XY) ---\n Fairy: '#d685ad',\n} as const;\n\nexport type PokemonColorName = keyof typeof pokemonColors;\n\n/**\n * The 18 Pokémon type colors as a `Palette<PokemonColorName>`.\n *\n * Keys are Title Case ('Fire', 'Water'); standard normalizer accepts\n * any case + punctuation variant. Default metric is `'deltaE76'`: the\n * set is small enough that metric choice is academic.\n *\n * @example\n * identify('#ee8130', { palette: pokemon }); // 'Fire'\n * resolve('water', { palette: pokemon }); // '#6390f0'\n * pokemon.colors.Dragon; // '#6f35fc'\n */\nexport const pokemon = {\n name: 'pokemon',\n colors: pokemonColors,\n normalize: standardNormalize,\n defaultMetric: 'deltaE76',\n} as const satisfies Palette<PokemonColorName>;\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { standardNormalize } from './normalize.js';
|
|
2
|
+
/**
|
|
3
|
+
* Pokémon type colors — the 18 canonical type symbols as displayed on
|
|
4
|
+
* type badges in modern Pokémon media.
|
|
5
|
+
*
|
|
6
|
+
* Keys are Title Case singular ('Fire', 'Water', 'Grass'), matching the
|
|
7
|
+
* in-game spelling. `standardNormalize` strips case and punctuation, so
|
|
8
|
+
* `resolve('fire')`, `resolve('FIRE')`, and `resolve('Fire')` all hit
|
|
9
|
+
* the same entry.
|
|
10
|
+
*
|
|
11
|
+
* sRGB values are community-cited approximations of the type-badge
|
|
12
|
+
* colors documented on Bulbapedia
|
|
13
|
+
* (https://bulbapedia.bulbagarden.net/wiki/Type), which itself sources
|
|
14
|
+
* from in-game asset extraction. Pokémon names and the type framework
|
|
15
|
+
* are trademarks of Nintendo, Game Freak, and The Pokémon Company; this
|
|
16
|
+
* palette is a nominative reference, not an official asset set. See
|
|
17
|
+
* NOTICE.md.
|
|
18
|
+
*
|
|
19
|
+
* Default metric: `deltaE76`. The set is tiny (18 entries) and the
|
|
20
|
+
* inter-color distances are large enough that any sensible metric
|
|
21
|
+
* picks the same neighbor; deltaE76 is the cheapest.
|
|
22
|
+
*/
|
|
23
|
+
const pokemonColors = {
|
|
24
|
+
// --- Gen 1 (RGBY) ---
|
|
25
|
+
Normal: '#a8a77a',
|
|
26
|
+
Fighting: '#c22e28',
|
|
27
|
+
Flying: '#a98ff3',
|
|
28
|
+
Poison: '#a33ea1',
|
|
29
|
+
Ground: '#e2bf65',
|
|
30
|
+
Rock: '#b6a136',
|
|
31
|
+
Bug: '#a6b91a',
|
|
32
|
+
Ghost: '#735797',
|
|
33
|
+
Fire: '#ee8130',
|
|
34
|
+
Water: '#6390f0',
|
|
35
|
+
Grass: '#7ac74c',
|
|
36
|
+
Electric: '#f7d02c',
|
|
37
|
+
Psychic: '#f95587',
|
|
38
|
+
Ice: '#96d9d6',
|
|
39
|
+
Dragon: '#6f35fc',
|
|
40
|
+
// --- Gen 2 (GSC) ---
|
|
41
|
+
Dark: '#705746',
|
|
42
|
+
Steel: '#b7b7ce',
|
|
43
|
+
// --- Gen 6 (XY) ---
|
|
44
|
+
Fairy: '#d685ad',
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* The 18 Pokémon type colors as a `Palette<PokemonColorName>`.
|
|
48
|
+
*
|
|
49
|
+
* Keys are Title Case ('Fire', 'Water'); standard normalizer accepts
|
|
50
|
+
* any case + punctuation variant. Default metric is `'deltaE76'`: the
|
|
51
|
+
* set is small enough that metric choice is academic.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* identify('#ee8130', { palette: pokemon }); // 'Fire'
|
|
55
|
+
* resolve('water', { palette: pokemon }); // '#6390f0'
|
|
56
|
+
* pokemon.colors.Dragon; // '#6f35fc'
|
|
57
|
+
*/
|
|
58
|
+
export const pokemon = {
|
|
59
|
+
name: 'pokemon',
|
|
60
|
+
colors: pokemonColors,
|
|
61
|
+
normalize: standardNormalize,
|
|
62
|
+
defaultMetric: 'deltaE76',
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=pokemon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pokemon.js","sourceRoot":"","sources":["../../src/palettes/pokemon.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,aAAa,GAAG;IACpB,uBAAuB;IACvB,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,SAAS;IACnB,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,SAAS;IACd,MAAM,EAAE,SAAS;IAEjB,sBAAsB;IACtB,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAEhB,qBAAqB;IACrB,KAAK,EAAE,SAAS;CACR,CAAC;AAIX;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,aAAa;IACrB,SAAS,EAAE,iBAAiB;IAC5B,aAAa,EAAE,UAAU;CACmB,CAAC","sourcesContent":["import type { Palette } from '../types.js';\nimport { standardNormalize } from './normalize.js';\n\n/**\n * Pokémon type colors — the 18 canonical type symbols as displayed on\n * type badges in modern Pokémon media.\n *\n * Keys are Title Case singular ('Fire', 'Water', 'Grass'), matching the\n * in-game spelling. `standardNormalize` strips case and punctuation, so\n * `resolve('fire')`, `resolve('FIRE')`, and `resolve('Fire')` all hit\n * the same entry.\n *\n * sRGB values are community-cited approximations of the type-badge\n * colors documented on Bulbapedia\n * (https://bulbapedia.bulbagarden.net/wiki/Type), which itself sources\n * from in-game asset extraction. Pokémon names and the type framework\n * are trademarks of Nintendo, Game Freak, and The Pokémon Company; this\n * palette is a nominative reference, not an official asset set. See\n * NOTICE.md.\n *\n * Default metric: `deltaE76`. The set is tiny (18 entries) and the\n * inter-color distances are large enough that any sensible metric\n * picks the same neighbor; deltaE76 is the cheapest.\n */\nconst pokemonColors = {\n // --- Gen 1 (RGBY) ---\n Normal: '#a8a77a',\n Fighting: '#c22e28',\n Flying: '#a98ff3',\n Poison: '#a33ea1',\n Ground: '#e2bf65',\n Rock: '#b6a136',\n Bug: '#a6b91a',\n Ghost: '#735797',\n Fire: '#ee8130',\n Water: '#6390f0',\n Grass: '#7ac74c',\n Electric: '#f7d02c',\n Psychic: '#f95587',\n Ice: '#96d9d6',\n Dragon: '#6f35fc',\n\n // --- Gen 2 (GSC) ---\n Dark: '#705746',\n Steel: '#b7b7ce',\n\n // --- Gen 6 (XY) ---\n Fairy: '#d685ad',\n} as const;\n\nexport type PokemonColorName = keyof typeof pokemonColors;\n\n/**\n * The 18 Pokémon type colors as a `Palette<PokemonColorName>`.\n *\n * Keys are Title Case ('Fire', 'Water'); standard normalizer accepts\n * any case + punctuation variant. Default metric is `'deltaE76'`: the\n * set is small enough that metric choice is academic.\n *\n * @example\n * identify('#ee8130', { palette: pokemon }); // 'Fire'\n * resolve('water', { palette: pokemon }); // '#6390f0'\n * pokemon.colors.Dragon; // '#6f35fc'\n */\nexport const pokemon = {\n name: 'pokemon',\n colors: pokemonColors,\n normalize: standardNormalize,\n defaultMetric: 'deltaE76',\n} as const satisfies Palette<PokemonColorName>;\n"]}
|