@tenphi/glaze 0.0.0-snapshot.0fcd6cf → 0.0.0-snapshot.12fd135
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/AGENTS.md +29 -28
- package/README.md +2 -2
- package/dist/index.cjs +604 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +98 -34
- package/dist/index.d.mts +98 -34
- package/dist/index.mjs +602 -181
- package/dist/index.mjs.map +1 -1
- package/docs/exporting.mdx +2 -218
- package/docs/hdr.mdx +523 -0
- package/docs/methodology.mdx +2 -3
- package/docs/migration.md +53 -16
- package/docs/mixes.mdx +48 -5
- package/docs/okhst.mdx +2 -5
- package/docs/reference/color-definitions.md +13 -15
- package/docs/reference/color-tokens.md +11 -7
- package/docs/reference/configuration.md +28 -11
- package/docs/reference/contrast.md +4 -4
- package/docs/reference/index.md +7 -5
- package/docs/reference/output.md +31 -151
- package/docs/reference/palette.md +4 -4
- package/docs/reference/theme.md +10 -10
- package/docs/reference/utilities.md +40 -23
- package/docs/schemes.mdx +4 -5
- package/docs/shadows-and-glows.mdx +7 -225
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -252,12 +252,20 @@ type ToneValue = number | RelativeValue | ExtremeValue;
|
|
|
252
252
|
/** Color format for output. */
|
|
253
253
|
type GlazeColorFormat = 'okhsl' | 'okhst' | 'rgb' | 'hsl' | 'oklch';
|
|
254
254
|
/**
|
|
255
|
-
* Output format for an HDR glow value (`glaze.formatHdr()`)
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
255
|
+
* Output format for an HDR glow value (`glaze.formatHdr()`), its brightest
|
|
256
|
+
* channel past 1 (SDR white):
|
|
257
|
+
* - `'srgb'` (default, and what every exporter writes) — extended
|
|
258
|
+
* `color(srgb R G B)`: the sRGB transfer function continued past 1, the
|
|
259
|
+
* channels a WebGPU `'srgb'` canvas and the platform extended-sRGB color
|
|
260
|
+
* spaces take as they are.
|
|
261
|
+
* - `'srgb-linear'` — `color(srgb-linear R G B)`: the same color in linear
|
|
262
|
+
* light, for consumers that take linear channels.
|
|
263
|
+
*
|
|
264
|
+
* No other form: OKLCH lightness clamps at parse time, `rgb()` / `hsl()`
|
|
265
|
+
* cannot go past white, and the `rec2100-*` spaces would tie the value to an
|
|
266
|
+
* absolute reference white it doesn't need.
|
|
259
267
|
*/
|
|
260
|
-
type GlazeHdrFormat = 'srgb-linear';
|
|
268
|
+
type GlazeHdrFormat = 'srgb' | 'srgb-linear';
|
|
261
269
|
/**
|
|
262
270
|
* Controls which scheme variants are generated in the export.
|
|
263
271
|
* Light is always included (it's the default).
|
|
@@ -282,10 +290,16 @@ interface GlazeOutputModes {
|
|
|
282
290
|
*
|
|
283
291
|
* When on, each exporter adds the HDR values next to the SDR ones it
|
|
284
292
|
* already emits (only for the scheme variants the other modes include),
|
|
285
|
-
* always written as `color(srgb
|
|
293
|
+
* always written as extended `color(srgb R G B)`: Tasty `hdr` state keys,
|
|
286
294
|
* `json()` `lightHdr` / `darkHdr` / … keys, `tokens()` `lightHdr` / … maps,
|
|
287
295
|
* Tailwind blocks under `hdrSelector`, DTCG `$extensions`. `css()` reads
|
|
288
296
|
* its own `hdr` option, which falls back to this.
|
|
297
|
+
*
|
|
298
|
+
* The data tiers (DTCG, `json()`, `tokens()`) are what native apps and
|
|
299
|
+
* WebGPU canvases read. The CSS-family tiers (Tasty, `css()`, Tailwind) are
|
|
300
|
+
* experimental: no browser paints a CSS color past SDR white yet. Prefer
|
|
301
|
+
* turning this on per call (`theme.dtcg({ modes: { hdr: true } })`) over
|
|
302
|
+
* globally.
|
|
289
303
|
*/
|
|
290
304
|
hdr?: boolean;
|
|
291
305
|
}
|
|
@@ -455,6 +469,8 @@ interface LightingTuning {
|
|
|
455
469
|
/**
|
|
456
470
|
* Pigment saturation (0–1) in the surface's hue. Default: 0 (neutral black /
|
|
457
471
|
* white). Shows only with `reach` below 1 — pure black and white have no hue.
|
|
472
|
+
* A neutral surface has no hue either: there the tint takes the object's
|
|
473
|
+
* hue with `hueBleed` above 0, and the pigment stays neutral otherwise.
|
|
458
474
|
*/
|
|
459
475
|
tint?: number;
|
|
460
476
|
/**
|
|
@@ -492,7 +508,7 @@ interface GlowTuning extends LightingTuning {
|
|
|
492
508
|
* reach" warning. On a chromatic surface a `reach: 0` gray can measure
|
|
493
509
|
* slightly brighter than the surface and pins at full opacity instead.
|
|
494
510
|
* Nothing about the SDR variant changes. The gain lands the exact step when
|
|
495
|
-
* the headroom allows it; the brightest channel caps at `2^headroom`.
|
|
511
|
+
* the headroom allows it; the brightest linear channel caps at `2^headroom`.
|
|
496
512
|
* High-contrast schemes use the same headroom.
|
|
497
513
|
*
|
|
498
514
|
* The HDR value lands the whole step, not just the part past white. A
|
|
@@ -675,7 +691,8 @@ interface ResolvedColorVariant {
|
|
|
675
691
|
* The HDR value of a glow past SDR white: an opaque base plus a gain. The base
|
|
676
692
|
* is what SDR paints at its brightest — the glow's pigment at full opacity, or
|
|
677
693
|
* the white surface it cannot lift — and the HDR color is that base's linear
|
|
678
|
-
* sRGB times `2^exposure`. Format it with `glaze.formatHdr()
|
|
694
|
+
* sRGB times `2^exposure`. Format it with `glaze.formatHdr()`, or read its
|
|
695
|
+
* channels with `hdrToSrgb()` / `hdrToLinearSrgb()`.
|
|
679
696
|
*
|
|
680
697
|
* Stored in OKHST like the variant. `s` is always standard (non-pastel)
|
|
681
698
|
* OKHSL saturation, whatever the variant's `pastel`, since the base is an
|
|
@@ -727,7 +744,8 @@ interface GlazeConfig {
|
|
|
727
744
|
* (`'@media(prefers-color-scheme: dark)'` / `'@media(prefers-contrast: more)'`
|
|
728
745
|
* / `'@media(dynamic-range: high)'`) so tokens react to the OS preference
|
|
729
746
|
* and the display without registering custom states. `hdr` keys an HDR
|
|
730
|
-
* glow value and is used only with `modes.hdr
|
|
747
|
+
* glow value and is used only with `modes.hdr` (experimental, see
|
|
748
|
+
* `GlazeOutputModes.hdr`).
|
|
731
749
|
*/
|
|
732
750
|
states?: {
|
|
733
751
|
dark?: string;
|
|
@@ -1367,8 +1385,8 @@ interface GlazeTheme {
|
|
|
1367
1385
|
*
|
|
1368
1386
|
* With `modes.hdr`, each scheme map is followed by a dense `<scheme>Hdr`
|
|
1369
1387
|
* map (`lightHdr`, `darkHdr`, …): every glow with an HDR value in any
|
|
1370
|
-
* emitted scheme, as `color(srgb
|
|
1371
|
-
* scheme has none.
|
|
1388
|
+
* emitted scheme, as extended `color(srgb …)`, or its SDR value where
|
|
1389
|
+
* that scheme has none.
|
|
1372
1390
|
*/
|
|
1373
1391
|
tokens(options?: GlazeJsonOptions): Record<string, Record<string, string>>;
|
|
1374
1392
|
/**
|
|
@@ -1482,6 +1500,9 @@ interface GlazeCssOptions {
|
|
|
1482
1500
|
* Add the HDR tier as `result.hdr` (see {@link GlazeCssResult.hdr}).
|
|
1483
1501
|
* Default: the global `modes.hdr` (false). `css()` has no `modes` — it
|
|
1484
1502
|
* always emits all four schemes — so this is its HDR switch.
|
|
1503
|
+
* @experimental No browser paints a CSS color past SDR white yet, so this
|
|
1504
|
+
* tier looks like SDR at best today, and its shape may change (for example
|
|
1505
|
+
* to CSS `hdr-color()`) once one does.
|
|
1485
1506
|
*/
|
|
1486
1507
|
hdr?: boolean;
|
|
1487
1508
|
}
|
|
@@ -1498,7 +1519,7 @@ interface GlazeCssResult extends GlazeCssSchemeBlocks {
|
|
|
1498
1519
|
* The HDR tier, present when HDR output is on — the `hdr` option, which
|
|
1499
1520
|
* defaults to the global `modes.hdr`: one block per scheme,
|
|
1500
1521
|
* each re-declaring every color that has an HDR value in any scheme — its
|
|
1501
|
-
* HDR value (`color(srgb
|
|
1522
|
+
* HDR value (extended `color(srgb R G B)`) where that scheme has one, and
|
|
1502
1523
|
* the scheme's SDR declaration where it has none. The blocks are dense so
|
|
1503
1524
|
* a light HDR value can never leak into dark: wire each one after the SDR
|
|
1504
1525
|
* blocks, under the same selector plus `(dynamic-range: high)`. Every block
|
|
@@ -1538,9 +1559,11 @@ type DtcgColorValue = DtcgSrgbColorValue | DtcgOklchColorValue;
|
|
|
1538
1559
|
/**
|
|
1539
1560
|
* The HDR value of a glow past SDR white, carried in a DTCG token's
|
|
1540
1561
|
* `$extensions['me.tenphi.glaze'].hdr` (`$value` stays the SDR color, since
|
|
1541
|
-
* DTCG color components stop at 1). Maps onto native APIs: UIKit
|
|
1542
|
-
* `
|
|
1543
|
-
* `
|
|
1562
|
+
* DTCG color components stop at 1). Maps onto native APIs: UIKit
|
|
1563
|
+
* `UIColor(red:green:blue:alpha:exposure:)` (AppKit: its `NSColor` twin) from
|
|
1564
|
+
* `base` and `exposure`, or Android
|
|
1565
|
+
* `Color.pack(r, g, b, 1f, ColorSpace.get(ColorSpace.Named.EXTENDED_SRGB))`
|
|
1566
|
+
* from `value`.
|
|
1544
1567
|
*/
|
|
1545
1568
|
interface GlazeDtcgHdr {
|
|
1546
1569
|
/** Gain over `base` in stops (`log2` of the linear factor), above 0. */
|
|
@@ -1554,11 +1577,12 @@ interface GlazeDtcgHdr {
|
|
|
1554
1577
|
/** The opaque base (what SDR paints), as a DTCG sRGB color. */
|
|
1555
1578
|
base: DtcgSrgbColorValue;
|
|
1556
1579
|
/**
|
|
1557
|
-
* The HDR color
|
|
1580
|
+
* The HDR color, `base × 2^exposure` in linear light, as extended sRGB
|
|
1581
|
+
* components (the numbers of `glaze.formatHdr()`): its brightest channel
|
|
1558
1582
|
* above 1 (the others may stay below).
|
|
1559
1583
|
*/
|
|
1560
1584
|
value: {
|
|
1561
|
-
colorSpace: 'srgb
|
|
1585
|
+
colorSpace: 'srgb';
|
|
1562
1586
|
components: [number, number, number];
|
|
1563
1587
|
};
|
|
1564
1588
|
}
|
|
@@ -1718,6 +1742,9 @@ interface GlazeTailwindOptions {
|
|
|
1718
1742
|
* where the scheme has none) and is scoped by this selector alone (light),
|
|
1719
1743
|
* combined with `darkSelector` (dark), with `highContrastSelector` (light
|
|
1720
1744
|
* high contrast), or with both.
|
|
1745
|
+
* @experimental No browser paints a CSS color past SDR white yet, so this
|
|
1746
|
+
* tier looks like SDR at best today, and its shape may change (for example
|
|
1747
|
+
* to CSS `hdr-color()`) once one does.
|
|
1721
1748
|
*/
|
|
1722
1749
|
hdrSelector?: string;
|
|
1723
1750
|
}
|
|
@@ -1791,6 +1818,9 @@ interface GlazePaletteCssOptions extends GlazePaletteExportOptions {
|
|
|
1791
1818
|
/**
|
|
1792
1819
|
* Add the HDR tier as `result.hdr` (see {@link GlazeCssResult.hdr}).
|
|
1793
1820
|
* Default: the global `modes.hdr` (false).
|
|
1821
|
+
* @experimental No browser paints a CSS color past SDR white yet, so this
|
|
1822
|
+
* tier looks like SDR at best today, and its shape may change (for example
|
|
1823
|
+
* to CSS `hdr-color()`) once one does.
|
|
1794
1824
|
*/
|
|
1795
1825
|
hdr?: boolean;
|
|
1796
1826
|
}
|
|
@@ -1860,14 +1890,6 @@ interface GlazePalette {
|
|
|
1860
1890
|
tailwind(options?: GlazeTailwindOptions & GlazePaletteExportOptions): string;
|
|
1861
1891
|
}
|
|
1862
1892
|
//#endregion
|
|
1863
|
-
//#region src/serialize.d.ts
|
|
1864
|
-
/** Type guard for theme authoring snapshots (prefers `kind`, falls back to shape). */
|
|
1865
|
-
declare function isThemeExport(data: unknown): data is GlazeThemeExport;
|
|
1866
|
-
/** Type guard for color-token authoring snapshots. */
|
|
1867
|
-
declare function isColorTokenExport(data: unknown): data is GlazeColorTokenExport;
|
|
1868
|
-
/** Type guard for palette authoring snapshots. */
|
|
1869
|
-
declare function isPaletteExport(data: unknown): data is GlazePaletteExport;
|
|
1870
|
-
//#endregion
|
|
1871
1893
|
//#region src/glaze.d.ts
|
|
1872
1894
|
type PaletteInput = Record<string, GlazeTheme>;
|
|
1873
1895
|
/**
|
|
@@ -1914,13 +1936,21 @@ declare namespace glaze {
|
|
|
1914
1936
|
var fromRgb: (r: number, g: number, b: number) => GlazeTheme;
|
|
1915
1937
|
var colorFrom: (data: GlazeColorTokenExport) => GlazeColorToken;
|
|
1916
1938
|
var paletteFrom: (data: GlazePaletteExport) => GlazePalette;
|
|
1917
|
-
var isThemeExport:
|
|
1918
|
-
var isColorTokenExport:
|
|
1919
|
-
var isPaletteExport:
|
|
1939
|
+
var isThemeExport: (value: unknown) => value is GlazeThemeExport;
|
|
1940
|
+
var isColorTokenExport: (value: unknown) => value is GlazeColorTokenExport;
|
|
1941
|
+
var isPaletteExport: (value: unknown) => value is GlazePaletteExport;
|
|
1920
1942
|
var getConfig: () => GlazeConfigResolved;
|
|
1921
1943
|
var resetConfig: () => void;
|
|
1922
1944
|
}
|
|
1923
1945
|
//#endregion
|
|
1946
|
+
//#region src/serialize.d.ts
|
|
1947
|
+
/** Type guard for theme authoring snapshots (prefers `kind`, falls back to shape). */
|
|
1948
|
+
declare function isThemeExport(data: unknown): data is GlazeThemeExport;
|
|
1949
|
+
/** Type guard for color-token authoring snapshots. */
|
|
1950
|
+
declare function isColorTokenExport(data: unknown): data is GlazeColorTokenExport;
|
|
1951
|
+
/** Type guard for palette authoring snapshots. */
|
|
1952
|
+
declare function isPaletteExport(data: unknown): data is GlazePaletteExport;
|
|
1953
|
+
//#endregion
|
|
1924
1954
|
//#region src/channels.d.ts
|
|
1925
1955
|
interface HueDeclaration {
|
|
1926
1956
|
prop: string;
|
|
@@ -1965,12 +1995,14 @@ interface ChannelCtx {
|
|
|
1965
1995
|
* emits raw CSS or non-Tasty token maps.
|
|
1966
1996
|
*/
|
|
1967
1997
|
declare function assertNativeFormat(format: GlazeColorFormat | undefined, method: string): void;
|
|
1998
|
+
/** The modes `assertAllPastel` reads: which schemes are emitted. */
|
|
1999
|
+
type SchemeModes = Required<Pick<GlazeOutputModes, 'dark' | 'highContrast'>>;
|
|
1968
2000
|
/**
|
|
1969
2001
|
* Throw when `splitHue` is enabled but any exported color is not pastel.
|
|
1970
2002
|
* Hue rotation is only clip-free when chroma is bounded by the hue-independent
|
|
1971
2003
|
* safe chroma (`computeSafeChromaOKLCH`).
|
|
1972
2004
|
*/
|
|
1973
|
-
declare function assertAllPastel(resolved: Map<string, ResolvedColor>, modes:
|
|
2005
|
+
declare function assertAllPastel(resolved: Map<string, ResolvedColor>, modes: SchemeModes): void;
|
|
1974
2006
|
//#endregion
|
|
1975
2007
|
//#region src/roles.d.ts
|
|
1976
2008
|
/**
|
|
@@ -2069,8 +2101,8 @@ declare function variantToOkhsl(v: {
|
|
|
2069
2101
|
* luminance `Ys` — both the exact functions the contrast solver uses, and
|
|
2070
2102
|
* both public), strict hex parsing (`parseHex` / `parseHexAlpha` check every
|
|
2071
2103
|
* digit), and multi-format output (okhsl, rgb, hsl, oklch, plus the
|
|
2072
|
-
* `color(srgb-linear …)`
|
|
2073
|
-
* 1).
|
|
2104
|
+
* unclamped `color(srgb …)` / `color(srgb-linear …)` writers for HDR glow
|
|
2105
|
+
* values, whose channels may exceed 1).
|
|
2074
2106
|
*/
|
|
2075
2107
|
type Vec3 = [number, number, number];
|
|
2076
2108
|
/**
|
|
@@ -2141,6 +2173,11 @@ declare const oklabToOkhsl: (lab: Vec3, pastel?: boolean) => Vec3;
|
|
|
2141
2173
|
/**
|
|
2142
2174
|
* Convert gamma-encoded sRGB (0–1 per channel) to OKHSL.
|
|
2143
2175
|
* Returns [h, s, l] where h: 0–360, s: 0–1, l: 0–1.
|
|
2176
|
+
*
|
|
2177
|
+
* A gray reads with saturation 0 (its computed hue is kept). Its OKLab
|
|
2178
|
+
* residue would otherwise come out as a saturation that grows toward white
|
|
2179
|
+
* (`#fefefe` reads 1.6e-5, `rgb(254.999 254.999 254.999)` 1.6e-2), which a
|
|
2180
|
+
* color carries into every scheme and an OKHSL mix reads as a hue.
|
|
2144
2181
|
*/
|
|
2145
2182
|
declare function srgbToOkhsl(rgb: [number, number, number], pastel?: boolean): [number, number, number];
|
|
2146
2183
|
/**
|
|
@@ -2208,10 +2245,21 @@ declare function formatOklch(h: number, s: number, l: number, pastel?: boolean):
|
|
|
2208
2245
|
* Format linear sRGB channels as a CSS `color(srgb-linear R G B)` string with
|
|
2209
2246
|
* 4 decimals. Unlike the other writers it takes linear light, not OKHSL, and
|
|
2210
2247
|
* does not clamp: a channel may exceed 1, which is how an HDR glow value
|
|
2211
|
-
*
|
|
2212
|
-
* above it
|
|
2248
|
+
* written with `glaze.formatHdr(v, 'srgb-linear')` goes past SDR white — `1`
|
|
2249
|
+
* is SDR white, `2` one stop above it (the default extended form is
|
|
2250
|
+
* `formatSrgb`). Opaque only; HDR values carry no alpha.
|
|
2213
2251
|
*/
|
|
2214
2252
|
declare function formatSrgbLinear(rgb: [number, number, number]): string;
|
|
2253
|
+
/**
|
|
2254
|
+
* Format extended sRGB channels — gamma-encoded, with the transfer function
|
|
2255
|
+
* continued past 1 (`sRGBLinearToGamma` does) — as a CSS `color(srgb R G B)`
|
|
2256
|
+
* string with 4 decimals. Like `formatSrgbLinear` it takes the channels of
|
|
2257
|
+
* its own space and does not clamp, so an HDR glow value
|
|
2258
|
+
* (`glaze.formatHdr()`) can pass SDR white: `1` is SDR white, about `1.3533`
|
|
2259
|
+
* one stop above it. CSS reads it as the same color as the matching
|
|
2260
|
+
* `color(srgb-linear …)`. Opaque only; HDR values carry no alpha.
|
|
2261
|
+
*/
|
|
2262
|
+
declare function formatSrgb(rgb: [number, number, number]): string;
|
|
2215
2263
|
/**
|
|
2216
2264
|
* Convert gamma-encoded sRGB channels (0–1) to a 6-digit lowercase hex
|
|
2217
2265
|
* string (`#rrggbb`). Channels are clamped to [0,1] and rounded to 8-bit.
|
|
@@ -2225,5 +2273,21 @@ declare function srgbToHex(rgb: [number, number, number]): `#${string}`;
|
|
|
2225
2273
|
*/
|
|
2226
2274
|
declare function okhslToOklch(h: number, s: number, l: number, pastel?: boolean): [number, number, number];
|
|
2227
2275
|
//#endregion
|
|
2228
|
-
|
|
2276
|
+
//#region src/lighting.d.ts
|
|
2277
|
+
/**
|
|
2278
|
+
* Linear sRGB of a resolved HDR value: the base's channels times
|
|
2279
|
+
* `2^exposure`, unclamped (the brightest channel can reach `2^headroom`).
|
|
2280
|
+
* The base is non-pastel OKHSL, so no `pastel` flag applies.
|
|
2281
|
+
*/
|
|
2282
|
+
declare function hdrToLinearSrgb(hdr: ResolvedHdr): [number, number, number];
|
|
2283
|
+
/**
|
|
2284
|
+
* Extended sRGB of a resolved HDR value: `hdrToLinearSrgb` through the sRGB
|
|
2285
|
+
* transfer function, continued past 1 the way CSS and the platform
|
|
2286
|
+
* extended-sRGB spaces continue it, unclamped. These are the channels of
|
|
2287
|
+
* `color(srgb R G B)` (`glaze.formatHdr()`), and what a WebGPU `'srgb'`
|
|
2288
|
+
* canvas, `CGColorSpace.extendedSRGB`, and Android's `EXTENDED_SRGB` take.
|
|
2289
|
+
*/
|
|
2290
|
+
declare function hdrToSrgb(hdr: ResolvedHdr): [number, number, number];
|
|
2291
|
+
//#endregion
|
|
2292
|
+
export { APCA_HC_ENHANCEMENT, APCA_MAX_LC, APCA_PRESETS, type AdaptationMode, type ApcaPreset, type ChannelCtx, type ColorDef, type ColorMap, type ContrastPreset, type ContrastSpec, type DtcgColorSpace, type DtcgColorToken, type DtcgColorValue, type DtcgDocument, type DtcgOklchColorValue, type DtcgResolverModifier, type DtcgResolverRef, type DtcgResolverSet, type DtcgSrgbColorValue, type DtcgTokenTree, type ExtremeValue, type FindToneForContrastOptions, type FindToneForContrastResult, type FindValueForMixContrastOptions, type FindValueForMixContrastResult, GLAZE_EXPORT_VERSION, type GlazeColorCssOptions, type GlazeColorDtcgResolverOptions, type GlazeColorDtcgResult, type GlazeColorFormat, type GlazeColorInput, type GlazeColorInputExport, type GlazeColorOverrides, type GlazeColorOverridesExport, type GlazeColorTailwindOptions, type GlazeColorToken, type GlazeColorTokenExport, type GlazeColorValue, type GlazeConfig, type GlazeConfigOverride, type GlazeConfigResolved, type GlazeCssOptions, type GlazeCssResult, type GlazeCssSchemeBlocks, type GlazeDtcgExtensions, type GlazeDtcgHdr, type GlazeDtcgOptions, type GlazeDtcgResolverContextNames, type GlazeDtcgResolverDocument, type GlazeDtcgResolverOptions, type GlazeDtcgResult, type GlazeExportKind, type GlazeExportVersion, type GlazeExtendOptions, type GlazeFromInput, type GlazeGlowInput, type GlazeHdrFormat, type GlazeJsonOptions, type GlazeLightingInput, type GlazeOutputModes, type GlazePalette, type GlazePaletteCssOptions, type GlazePaletteExport, type GlazePaletteExportOptions, type GlazePaletteOptions, type GlazePaletteTastyOptions, type GlazeShadowInput, type GlazeTailwindOptions, type GlazeTastyOptions, type GlazeTheme, type GlazeThemeExport, type GlazeThemeSeed, type GlazeTokenOptions, type GlowColorDef, type GlowTuning, type HCPair, type HexColor, type HueDeclaration, type HuePlan, type LightingTuning, type MinContrast, type MixColorDef, type OkhslColor, type OkhstColor, type OklchColor, type Polarity, REF_EPS, type RegularColorDef, type RelativeValue, type ResolvedColor, type ResolvedColorVariant, type ResolvedContrast, type ResolvedHdr, type RgbColor, type Role, type RoleInput, type ShadowColorDef, type ShadowTuning, type ToneValue, type ToneWindow, apcaContrast, apcaLuminanceFromLinearRgb, assertAllPastel, assertNativeFormat, contrastRatioFromLuminance, cuspLightness, findToneForContrast, findValueForMixContrast, formatHsl, formatOkhsl, formatOkhst, formatOklch, formatRgb, formatSrgb, formatSrgbLinear, fromTone, gamutClampedLuminance, glaze, hdrToLinearSrgb, hdrToSrgb, hslToSrgb, inferRoleFromName, isColorTokenExport, isPaletteExport, isThemeExport, normalizeRole, okhslToLinearSrgb, okhslToOkhst, okhslToOklab, okhslToOklch, okhslToSrgb, okhstToOkhsl, oklabToOkhsl, oppositeRole, parseHex, parseHexAlpha, relativeLuminanceFromLinearRgb, resolveApcaTarget, resolveContrastForLevel, resolveContrastForMode, resolveMinContrast, roleToPolarity, srgbToHex, srgbToOkhsl, toTone, toneFromY, variantToOkhsl, yFromTone };
|
|
2229
2293
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -252,12 +252,20 @@ type ToneValue = number | RelativeValue | ExtremeValue;
|
|
|
252
252
|
/** Color format for output. */
|
|
253
253
|
type GlazeColorFormat = 'okhsl' | 'okhst' | 'rgb' | 'hsl' | 'oklch';
|
|
254
254
|
/**
|
|
255
|
-
* Output format for an HDR glow value (`glaze.formatHdr()`)
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
255
|
+
* Output format for an HDR glow value (`glaze.formatHdr()`), its brightest
|
|
256
|
+
* channel past 1 (SDR white):
|
|
257
|
+
* - `'srgb'` (default, and what every exporter writes) — extended
|
|
258
|
+
* `color(srgb R G B)`: the sRGB transfer function continued past 1, the
|
|
259
|
+
* channels a WebGPU `'srgb'` canvas and the platform extended-sRGB color
|
|
260
|
+
* spaces take as they are.
|
|
261
|
+
* - `'srgb-linear'` — `color(srgb-linear R G B)`: the same color in linear
|
|
262
|
+
* light, for consumers that take linear channels.
|
|
263
|
+
*
|
|
264
|
+
* No other form: OKLCH lightness clamps at parse time, `rgb()` / `hsl()`
|
|
265
|
+
* cannot go past white, and the `rec2100-*` spaces would tie the value to an
|
|
266
|
+
* absolute reference white it doesn't need.
|
|
259
267
|
*/
|
|
260
|
-
type GlazeHdrFormat = 'srgb-linear';
|
|
268
|
+
type GlazeHdrFormat = 'srgb' | 'srgb-linear';
|
|
261
269
|
/**
|
|
262
270
|
* Controls which scheme variants are generated in the export.
|
|
263
271
|
* Light is always included (it's the default).
|
|
@@ -282,10 +290,16 @@ interface GlazeOutputModes {
|
|
|
282
290
|
*
|
|
283
291
|
* When on, each exporter adds the HDR values next to the SDR ones it
|
|
284
292
|
* already emits (only for the scheme variants the other modes include),
|
|
285
|
-
* always written as `color(srgb
|
|
293
|
+
* always written as extended `color(srgb R G B)`: Tasty `hdr` state keys,
|
|
286
294
|
* `json()` `lightHdr` / `darkHdr` / … keys, `tokens()` `lightHdr` / … maps,
|
|
287
295
|
* Tailwind blocks under `hdrSelector`, DTCG `$extensions`. `css()` reads
|
|
288
296
|
* its own `hdr` option, which falls back to this.
|
|
297
|
+
*
|
|
298
|
+
* The data tiers (DTCG, `json()`, `tokens()`) are what native apps and
|
|
299
|
+
* WebGPU canvases read. The CSS-family tiers (Tasty, `css()`, Tailwind) are
|
|
300
|
+
* experimental: no browser paints a CSS color past SDR white yet. Prefer
|
|
301
|
+
* turning this on per call (`theme.dtcg({ modes: { hdr: true } })`) over
|
|
302
|
+
* globally.
|
|
289
303
|
*/
|
|
290
304
|
hdr?: boolean;
|
|
291
305
|
}
|
|
@@ -455,6 +469,8 @@ interface LightingTuning {
|
|
|
455
469
|
/**
|
|
456
470
|
* Pigment saturation (0–1) in the surface's hue. Default: 0 (neutral black /
|
|
457
471
|
* white). Shows only with `reach` below 1 — pure black and white have no hue.
|
|
472
|
+
* A neutral surface has no hue either: there the tint takes the object's
|
|
473
|
+
* hue with `hueBleed` above 0, and the pigment stays neutral otherwise.
|
|
458
474
|
*/
|
|
459
475
|
tint?: number;
|
|
460
476
|
/**
|
|
@@ -492,7 +508,7 @@ interface GlowTuning extends LightingTuning {
|
|
|
492
508
|
* reach" warning. On a chromatic surface a `reach: 0` gray can measure
|
|
493
509
|
* slightly brighter than the surface and pins at full opacity instead.
|
|
494
510
|
* Nothing about the SDR variant changes. The gain lands the exact step when
|
|
495
|
-
* the headroom allows it; the brightest channel caps at `2^headroom`.
|
|
511
|
+
* the headroom allows it; the brightest linear channel caps at `2^headroom`.
|
|
496
512
|
* High-contrast schemes use the same headroom.
|
|
497
513
|
*
|
|
498
514
|
* The HDR value lands the whole step, not just the part past white. A
|
|
@@ -675,7 +691,8 @@ interface ResolvedColorVariant {
|
|
|
675
691
|
* The HDR value of a glow past SDR white: an opaque base plus a gain. The base
|
|
676
692
|
* is what SDR paints at its brightest — the glow's pigment at full opacity, or
|
|
677
693
|
* the white surface it cannot lift — and the HDR color is that base's linear
|
|
678
|
-
* sRGB times `2^exposure`. Format it with `glaze.formatHdr()
|
|
694
|
+
* sRGB times `2^exposure`. Format it with `glaze.formatHdr()`, or read its
|
|
695
|
+
* channels with `hdrToSrgb()` / `hdrToLinearSrgb()`.
|
|
679
696
|
*
|
|
680
697
|
* Stored in OKHST like the variant. `s` is always standard (non-pastel)
|
|
681
698
|
* OKHSL saturation, whatever the variant's `pastel`, since the base is an
|
|
@@ -727,7 +744,8 @@ interface GlazeConfig {
|
|
|
727
744
|
* (`'@media(prefers-color-scheme: dark)'` / `'@media(prefers-contrast: more)'`
|
|
728
745
|
* / `'@media(dynamic-range: high)'`) so tokens react to the OS preference
|
|
729
746
|
* and the display without registering custom states. `hdr` keys an HDR
|
|
730
|
-
* glow value and is used only with `modes.hdr
|
|
747
|
+
* glow value and is used only with `modes.hdr` (experimental, see
|
|
748
|
+
* `GlazeOutputModes.hdr`).
|
|
731
749
|
*/
|
|
732
750
|
states?: {
|
|
733
751
|
dark?: string;
|
|
@@ -1367,8 +1385,8 @@ interface GlazeTheme {
|
|
|
1367
1385
|
*
|
|
1368
1386
|
* With `modes.hdr`, each scheme map is followed by a dense `<scheme>Hdr`
|
|
1369
1387
|
* map (`lightHdr`, `darkHdr`, …): every glow with an HDR value in any
|
|
1370
|
-
* emitted scheme, as `color(srgb
|
|
1371
|
-
* scheme has none.
|
|
1388
|
+
* emitted scheme, as extended `color(srgb …)`, or its SDR value where
|
|
1389
|
+
* that scheme has none.
|
|
1372
1390
|
*/
|
|
1373
1391
|
tokens(options?: GlazeJsonOptions): Record<string, Record<string, string>>;
|
|
1374
1392
|
/**
|
|
@@ -1482,6 +1500,9 @@ interface GlazeCssOptions {
|
|
|
1482
1500
|
* Add the HDR tier as `result.hdr` (see {@link GlazeCssResult.hdr}).
|
|
1483
1501
|
* Default: the global `modes.hdr` (false). `css()` has no `modes` — it
|
|
1484
1502
|
* always emits all four schemes — so this is its HDR switch.
|
|
1503
|
+
* @experimental No browser paints a CSS color past SDR white yet, so this
|
|
1504
|
+
* tier looks like SDR at best today, and its shape may change (for example
|
|
1505
|
+
* to CSS `hdr-color()`) once one does.
|
|
1485
1506
|
*/
|
|
1486
1507
|
hdr?: boolean;
|
|
1487
1508
|
}
|
|
@@ -1498,7 +1519,7 @@ interface GlazeCssResult extends GlazeCssSchemeBlocks {
|
|
|
1498
1519
|
* The HDR tier, present when HDR output is on — the `hdr` option, which
|
|
1499
1520
|
* defaults to the global `modes.hdr`: one block per scheme,
|
|
1500
1521
|
* each re-declaring every color that has an HDR value in any scheme — its
|
|
1501
|
-
* HDR value (`color(srgb
|
|
1522
|
+
* HDR value (extended `color(srgb R G B)`) where that scheme has one, and
|
|
1502
1523
|
* the scheme's SDR declaration where it has none. The blocks are dense so
|
|
1503
1524
|
* a light HDR value can never leak into dark: wire each one after the SDR
|
|
1504
1525
|
* blocks, under the same selector plus `(dynamic-range: high)`. Every block
|
|
@@ -1538,9 +1559,11 @@ type DtcgColorValue = DtcgSrgbColorValue | DtcgOklchColorValue;
|
|
|
1538
1559
|
/**
|
|
1539
1560
|
* The HDR value of a glow past SDR white, carried in a DTCG token's
|
|
1540
1561
|
* `$extensions['me.tenphi.glaze'].hdr` (`$value` stays the SDR color, since
|
|
1541
|
-
* DTCG color components stop at 1). Maps onto native APIs: UIKit
|
|
1542
|
-
* `
|
|
1543
|
-
* `
|
|
1562
|
+
* DTCG color components stop at 1). Maps onto native APIs: UIKit
|
|
1563
|
+
* `UIColor(red:green:blue:alpha:exposure:)` (AppKit: its `NSColor` twin) from
|
|
1564
|
+
* `base` and `exposure`, or Android
|
|
1565
|
+
* `Color.pack(r, g, b, 1f, ColorSpace.get(ColorSpace.Named.EXTENDED_SRGB))`
|
|
1566
|
+
* from `value`.
|
|
1544
1567
|
*/
|
|
1545
1568
|
interface GlazeDtcgHdr {
|
|
1546
1569
|
/** Gain over `base` in stops (`log2` of the linear factor), above 0. */
|
|
@@ -1554,11 +1577,12 @@ interface GlazeDtcgHdr {
|
|
|
1554
1577
|
/** The opaque base (what SDR paints), as a DTCG sRGB color. */
|
|
1555
1578
|
base: DtcgSrgbColorValue;
|
|
1556
1579
|
/**
|
|
1557
|
-
* The HDR color
|
|
1580
|
+
* The HDR color, `base × 2^exposure` in linear light, as extended sRGB
|
|
1581
|
+
* components (the numbers of `glaze.formatHdr()`): its brightest channel
|
|
1558
1582
|
* above 1 (the others may stay below).
|
|
1559
1583
|
*/
|
|
1560
1584
|
value: {
|
|
1561
|
-
colorSpace: 'srgb
|
|
1585
|
+
colorSpace: 'srgb';
|
|
1562
1586
|
components: [number, number, number];
|
|
1563
1587
|
};
|
|
1564
1588
|
}
|
|
@@ -1718,6 +1742,9 @@ interface GlazeTailwindOptions {
|
|
|
1718
1742
|
* where the scheme has none) and is scoped by this selector alone (light),
|
|
1719
1743
|
* combined with `darkSelector` (dark), with `highContrastSelector` (light
|
|
1720
1744
|
* high contrast), or with both.
|
|
1745
|
+
* @experimental No browser paints a CSS color past SDR white yet, so this
|
|
1746
|
+
* tier looks like SDR at best today, and its shape may change (for example
|
|
1747
|
+
* to CSS `hdr-color()`) once one does.
|
|
1721
1748
|
*/
|
|
1722
1749
|
hdrSelector?: string;
|
|
1723
1750
|
}
|
|
@@ -1791,6 +1818,9 @@ interface GlazePaletteCssOptions extends GlazePaletteExportOptions {
|
|
|
1791
1818
|
/**
|
|
1792
1819
|
* Add the HDR tier as `result.hdr` (see {@link GlazeCssResult.hdr}).
|
|
1793
1820
|
* Default: the global `modes.hdr` (false).
|
|
1821
|
+
* @experimental No browser paints a CSS color past SDR white yet, so this
|
|
1822
|
+
* tier looks like SDR at best today, and its shape may change (for example
|
|
1823
|
+
* to CSS `hdr-color()`) once one does.
|
|
1794
1824
|
*/
|
|
1795
1825
|
hdr?: boolean;
|
|
1796
1826
|
}
|
|
@@ -1860,14 +1890,6 @@ interface GlazePalette {
|
|
|
1860
1890
|
tailwind(options?: GlazeTailwindOptions & GlazePaletteExportOptions): string;
|
|
1861
1891
|
}
|
|
1862
1892
|
//#endregion
|
|
1863
|
-
//#region src/serialize.d.ts
|
|
1864
|
-
/** Type guard for theme authoring snapshots (prefers `kind`, falls back to shape). */
|
|
1865
|
-
declare function isThemeExport(data: unknown): data is GlazeThemeExport;
|
|
1866
|
-
/** Type guard for color-token authoring snapshots. */
|
|
1867
|
-
declare function isColorTokenExport(data: unknown): data is GlazeColorTokenExport;
|
|
1868
|
-
/** Type guard for palette authoring snapshots. */
|
|
1869
|
-
declare function isPaletteExport(data: unknown): data is GlazePaletteExport;
|
|
1870
|
-
//#endregion
|
|
1871
1893
|
//#region src/glaze.d.ts
|
|
1872
1894
|
type PaletteInput = Record<string, GlazeTheme>;
|
|
1873
1895
|
/**
|
|
@@ -1914,13 +1936,21 @@ declare namespace glaze {
|
|
|
1914
1936
|
var fromRgb: (r: number, g: number, b: number) => GlazeTheme;
|
|
1915
1937
|
var colorFrom: (data: GlazeColorTokenExport) => GlazeColorToken;
|
|
1916
1938
|
var paletteFrom: (data: GlazePaletteExport) => GlazePalette;
|
|
1917
|
-
var isThemeExport:
|
|
1918
|
-
var isColorTokenExport:
|
|
1919
|
-
var isPaletteExport:
|
|
1939
|
+
var isThemeExport: (value: unknown) => value is GlazeThemeExport;
|
|
1940
|
+
var isColorTokenExport: (value: unknown) => value is GlazeColorTokenExport;
|
|
1941
|
+
var isPaletteExport: (value: unknown) => value is GlazePaletteExport;
|
|
1920
1942
|
var getConfig: () => GlazeConfigResolved;
|
|
1921
1943
|
var resetConfig: () => void;
|
|
1922
1944
|
}
|
|
1923
1945
|
//#endregion
|
|
1946
|
+
//#region src/serialize.d.ts
|
|
1947
|
+
/** Type guard for theme authoring snapshots (prefers `kind`, falls back to shape). */
|
|
1948
|
+
declare function isThemeExport(data: unknown): data is GlazeThemeExport;
|
|
1949
|
+
/** Type guard for color-token authoring snapshots. */
|
|
1950
|
+
declare function isColorTokenExport(data: unknown): data is GlazeColorTokenExport;
|
|
1951
|
+
/** Type guard for palette authoring snapshots. */
|
|
1952
|
+
declare function isPaletteExport(data: unknown): data is GlazePaletteExport;
|
|
1953
|
+
//#endregion
|
|
1924
1954
|
//#region src/channels.d.ts
|
|
1925
1955
|
interface HueDeclaration {
|
|
1926
1956
|
prop: string;
|
|
@@ -1965,12 +1995,14 @@ interface ChannelCtx {
|
|
|
1965
1995
|
* emits raw CSS or non-Tasty token maps.
|
|
1966
1996
|
*/
|
|
1967
1997
|
declare function assertNativeFormat(format: GlazeColorFormat | undefined, method: string): void;
|
|
1998
|
+
/** The modes `assertAllPastel` reads: which schemes are emitted. */
|
|
1999
|
+
type SchemeModes = Required<Pick<GlazeOutputModes, 'dark' | 'highContrast'>>;
|
|
1968
2000
|
/**
|
|
1969
2001
|
* Throw when `splitHue` is enabled but any exported color is not pastel.
|
|
1970
2002
|
* Hue rotation is only clip-free when chroma is bounded by the hue-independent
|
|
1971
2003
|
* safe chroma (`computeSafeChromaOKLCH`).
|
|
1972
2004
|
*/
|
|
1973
|
-
declare function assertAllPastel(resolved: Map<string, ResolvedColor>, modes:
|
|
2005
|
+
declare function assertAllPastel(resolved: Map<string, ResolvedColor>, modes: SchemeModes): void;
|
|
1974
2006
|
//#endregion
|
|
1975
2007
|
//#region src/roles.d.ts
|
|
1976
2008
|
/**
|
|
@@ -2069,8 +2101,8 @@ declare function variantToOkhsl(v: {
|
|
|
2069
2101
|
* luminance `Ys` — both the exact functions the contrast solver uses, and
|
|
2070
2102
|
* both public), strict hex parsing (`parseHex` / `parseHexAlpha` check every
|
|
2071
2103
|
* digit), and multi-format output (okhsl, rgb, hsl, oklch, plus the
|
|
2072
|
-
* `color(srgb-linear …)`
|
|
2073
|
-
* 1).
|
|
2104
|
+
* unclamped `color(srgb …)` / `color(srgb-linear …)` writers for HDR glow
|
|
2105
|
+
* values, whose channels may exceed 1).
|
|
2074
2106
|
*/
|
|
2075
2107
|
type Vec3 = [number, number, number];
|
|
2076
2108
|
/**
|
|
@@ -2141,6 +2173,11 @@ declare const oklabToOkhsl: (lab: Vec3, pastel?: boolean) => Vec3;
|
|
|
2141
2173
|
/**
|
|
2142
2174
|
* Convert gamma-encoded sRGB (0–1 per channel) to OKHSL.
|
|
2143
2175
|
* Returns [h, s, l] where h: 0–360, s: 0–1, l: 0–1.
|
|
2176
|
+
*
|
|
2177
|
+
* A gray reads with saturation 0 (its computed hue is kept). Its OKLab
|
|
2178
|
+
* residue would otherwise come out as a saturation that grows toward white
|
|
2179
|
+
* (`#fefefe` reads 1.6e-5, `rgb(254.999 254.999 254.999)` 1.6e-2), which a
|
|
2180
|
+
* color carries into every scheme and an OKHSL mix reads as a hue.
|
|
2144
2181
|
*/
|
|
2145
2182
|
declare function srgbToOkhsl(rgb: [number, number, number], pastel?: boolean): [number, number, number];
|
|
2146
2183
|
/**
|
|
@@ -2208,10 +2245,21 @@ declare function formatOklch(h: number, s: number, l: number, pastel?: boolean):
|
|
|
2208
2245
|
* Format linear sRGB channels as a CSS `color(srgb-linear R G B)` string with
|
|
2209
2246
|
* 4 decimals. Unlike the other writers it takes linear light, not OKHSL, and
|
|
2210
2247
|
* does not clamp: a channel may exceed 1, which is how an HDR glow value
|
|
2211
|
-
*
|
|
2212
|
-
* above it
|
|
2248
|
+
* written with `glaze.formatHdr(v, 'srgb-linear')` goes past SDR white — `1`
|
|
2249
|
+
* is SDR white, `2` one stop above it (the default extended form is
|
|
2250
|
+
* `formatSrgb`). Opaque only; HDR values carry no alpha.
|
|
2213
2251
|
*/
|
|
2214
2252
|
declare function formatSrgbLinear(rgb: [number, number, number]): string;
|
|
2253
|
+
/**
|
|
2254
|
+
* Format extended sRGB channels — gamma-encoded, with the transfer function
|
|
2255
|
+
* continued past 1 (`sRGBLinearToGamma` does) — as a CSS `color(srgb R G B)`
|
|
2256
|
+
* string with 4 decimals. Like `formatSrgbLinear` it takes the channels of
|
|
2257
|
+
* its own space and does not clamp, so an HDR glow value
|
|
2258
|
+
* (`glaze.formatHdr()`) can pass SDR white: `1` is SDR white, about `1.3533`
|
|
2259
|
+
* one stop above it. CSS reads it as the same color as the matching
|
|
2260
|
+
* `color(srgb-linear …)`. Opaque only; HDR values carry no alpha.
|
|
2261
|
+
*/
|
|
2262
|
+
declare function formatSrgb(rgb: [number, number, number]): string;
|
|
2215
2263
|
/**
|
|
2216
2264
|
* Convert gamma-encoded sRGB channels (0–1) to a 6-digit lowercase hex
|
|
2217
2265
|
* string (`#rrggbb`). Channels are clamped to [0,1] and rounded to 8-bit.
|
|
@@ -2225,5 +2273,21 @@ declare function srgbToHex(rgb: [number, number, number]): `#${string}`;
|
|
|
2225
2273
|
*/
|
|
2226
2274
|
declare function okhslToOklch(h: number, s: number, l: number, pastel?: boolean): [number, number, number];
|
|
2227
2275
|
//#endregion
|
|
2228
|
-
|
|
2276
|
+
//#region src/lighting.d.ts
|
|
2277
|
+
/**
|
|
2278
|
+
* Linear sRGB of a resolved HDR value: the base's channels times
|
|
2279
|
+
* `2^exposure`, unclamped (the brightest channel can reach `2^headroom`).
|
|
2280
|
+
* The base is non-pastel OKHSL, so no `pastel` flag applies.
|
|
2281
|
+
*/
|
|
2282
|
+
declare function hdrToLinearSrgb(hdr: ResolvedHdr): [number, number, number];
|
|
2283
|
+
/**
|
|
2284
|
+
* Extended sRGB of a resolved HDR value: `hdrToLinearSrgb` through the sRGB
|
|
2285
|
+
* transfer function, continued past 1 the way CSS and the platform
|
|
2286
|
+
* extended-sRGB spaces continue it, unclamped. These are the channels of
|
|
2287
|
+
* `color(srgb R G B)` (`glaze.formatHdr()`), and what a WebGPU `'srgb'`
|
|
2288
|
+
* canvas, `CGColorSpace.extendedSRGB`, and Android's `EXTENDED_SRGB` take.
|
|
2289
|
+
*/
|
|
2290
|
+
declare function hdrToSrgb(hdr: ResolvedHdr): [number, number, number];
|
|
2291
|
+
//#endregion
|
|
2292
|
+
export { APCA_HC_ENHANCEMENT, APCA_MAX_LC, APCA_PRESETS, type AdaptationMode, type ApcaPreset, type ChannelCtx, type ColorDef, type ColorMap, type ContrastPreset, type ContrastSpec, type DtcgColorSpace, type DtcgColorToken, type DtcgColorValue, type DtcgDocument, type DtcgOklchColorValue, type DtcgResolverModifier, type DtcgResolverRef, type DtcgResolverSet, type DtcgSrgbColorValue, type DtcgTokenTree, type ExtremeValue, type FindToneForContrastOptions, type FindToneForContrastResult, type FindValueForMixContrastOptions, type FindValueForMixContrastResult, GLAZE_EXPORT_VERSION, type GlazeColorCssOptions, type GlazeColorDtcgResolverOptions, type GlazeColorDtcgResult, type GlazeColorFormat, type GlazeColorInput, type GlazeColorInputExport, type GlazeColorOverrides, type GlazeColorOverridesExport, type GlazeColorTailwindOptions, type GlazeColorToken, type GlazeColorTokenExport, type GlazeColorValue, type GlazeConfig, type GlazeConfigOverride, type GlazeConfigResolved, type GlazeCssOptions, type GlazeCssResult, type GlazeCssSchemeBlocks, type GlazeDtcgExtensions, type GlazeDtcgHdr, type GlazeDtcgOptions, type GlazeDtcgResolverContextNames, type GlazeDtcgResolverDocument, type GlazeDtcgResolverOptions, type GlazeDtcgResult, type GlazeExportKind, type GlazeExportVersion, type GlazeExtendOptions, type GlazeFromInput, type GlazeGlowInput, type GlazeHdrFormat, type GlazeJsonOptions, type GlazeLightingInput, type GlazeOutputModes, type GlazePalette, type GlazePaletteCssOptions, type GlazePaletteExport, type GlazePaletteExportOptions, type GlazePaletteOptions, type GlazePaletteTastyOptions, type GlazeShadowInput, type GlazeTailwindOptions, type GlazeTastyOptions, type GlazeTheme, type GlazeThemeExport, type GlazeThemeSeed, type GlazeTokenOptions, type GlowColorDef, type GlowTuning, type HCPair, type HexColor, type HueDeclaration, type HuePlan, type LightingTuning, type MinContrast, type MixColorDef, type OkhslColor, type OkhstColor, type OklchColor, type Polarity, REF_EPS, type RegularColorDef, type RelativeValue, type ResolvedColor, type ResolvedColorVariant, type ResolvedContrast, type ResolvedHdr, type RgbColor, type Role, type RoleInput, type ShadowColorDef, type ShadowTuning, type ToneValue, type ToneWindow, apcaContrast, apcaLuminanceFromLinearRgb, assertAllPastel, assertNativeFormat, contrastRatioFromLuminance, cuspLightness, findToneForContrast, findValueForMixContrast, formatHsl, formatOkhsl, formatOkhst, formatOklch, formatRgb, formatSrgb, formatSrgbLinear, fromTone, gamutClampedLuminance, glaze, hdrToLinearSrgb, hdrToSrgb, hslToSrgb, inferRoleFromName, isColorTokenExport, isPaletteExport, isThemeExport, normalizeRole, okhslToLinearSrgb, okhslToOkhst, okhslToOklab, okhslToOklch, okhslToSrgb, okhstToOkhsl, oklabToOkhsl, oppositeRole, parseHex, parseHexAlpha, relativeLuminanceFromLinearRgb, resolveApcaTarget, resolveContrastForLevel, resolveContrastForMode, resolveMinContrast, roleToPolarity, srgbToHex, srgbToOkhsl, toTone, toneFromY, variantToOkhsl, yFromTone };
|
|
2229
2293
|
//# sourceMappingURL=index.d.mts.map
|