/** * Design Studio color utilities. * * Design kit tokens are authored in OKLCH (CSS-native, the modern 2026 default). * CSS targets keep them verbatim, but native stacks (React Native, Flutter, * SwiftUI, Compose) need concrete sRGB — so `materialize` converts each token * with `oklchToHex`. The verifier also normalizes colors to hex before * comparing, so an `oklch()` token and the same color written as `#rrggbb` * count as a match. * * Conversion is the standard Björn Ottosson OKLab→linear-sRGB pipeline; values * out of the sRGB gamut are clamped (not gamut-mapped) — adequate for the * near-in-gamut palettes our kits use. */ /** Parse an `oklch(L C H[ / a])` string into [L(0..1), C, H(deg), a(0..1)] or null. */ export declare function parseOklch(value: string): [number, number, number, number] | null; /** * Convert an OKLCH string to `#rrggbb` (or `#rrggbbaa` when alpha < 1). * Returns null if `value` is not parseable OKLCH. */ export declare function oklchToHex(value: string): string | null; /** * Normalize any color token to a lowercase `#rrggbb[aa]` hex when possible. * Passes through existing hex (lowercased, expanded from #rgb), converts * `oklch(...)`, and returns null for values we can't resolve (named colors, * gradients, non-color tokens like font names). */ export declare function colorToHex(value: string): string | null; /** True when a token value looks like a color (OKLCH or hex), not a font/size. */ export declare function isColorToken(value: string): boolean; /** * Classify a design-token string into the axis it drives, so materialize/verify * can branch beyond colors. Order matters: colors first (an `oklch()` is not a * gradient), then single-unit forms, then multi-part shadow, then font stacks. * * A font-family is inferred structurally (a comma-separated list, or a single * quoted/multi-word/known-generic name) rather than by a token-name allowlist, * so custom fonts classify correctly. */ export declare function classifyTokenValue(value: string): import('../types/design-kit.js').TokenValueKind; //# sourceMappingURL=design-color.d.ts.map