/** * `useThemeColors()` — resolve the *active, scoped* theme palette to concrete * color values for consumers that can't read CSS custom properties. * * Native widgets are the audience: platform text inputs, ``, * SVG fills — anything where `var(--color-*)` never resolves because the * value is consumed outside Lynx's CSS pipeline. Components pass these * resolved literals via inline `style` or native props instead. * * Scoped + reactive: resolves through `useTheme()` (the nearest * ``'s controller, falling back to the global one), and the * getters read `theme.name` — call them inside render and a theme switch * recolors the consumer. * * ```tsx * const colors = useThemeColors(); * return () => ( * * ); * ``` */ import type { ColorToken } from '../contract.js'; export interface ThemeColors { /** * The active palette's value for `token`, normalized to hex — optionally * with `alpha` (0–1) appended as a hex byte (`#RRGGBBAA`). Returns `''` * when no theme is registered yet (pre-DS-import edge case). */ colorOf(token: ColorToken, alpha?: number): string; } export declare function useThemeColors(): ThemeColors; /** * Normalize an engine-safe palette color to full-form hex * (`#RRGGBB`/`#RRGGBBAA`) — the registry allows `rgb()`/`rgba()` entries and * shorthand hex, but native color parsers may accept only the full forms. * Unknown notations pass through unchanged. */ export declare function toHexColor(color: string): string; /** * Append an alpha channel (0–1) to a hex color * (`#RGB`/`#RRGGBB`/`#RRGGBBAA` → `#RRGGBBAA`). Non-hex input passes * through unchanged; non-finite alpha is treated as opaque. */ export declare function withAlpha(hex: string, alpha: number): string; //# sourceMappingURL=use-theme-colors.d.ts.map