/** * Color utilities for WealthX white-label theming. * Ported from \@wealthx/ui theme/utils.ts — zero MUI dependencies. */ declare function hexToRgb(hex: string): [number, number, number]; /** WCAG relative luminance (0 = black, 1 = white) */ declare function getLuminance(hex: string): number; /** Returns dark or light text color based on WCAG contrast ratio */ declare function getContrastText(backgroundColor: string): string; /** * Returns a CSS color-mix() string blending `color` with transparent at the given fill opacity. * Used for swatch/chip backgrounds in income/expense/debt indicators. * * @example colorMixSwatch("#3B82F6") // "color-mix(in srgb, #3B82F6 15%, transparent)" * @example colorMixSwatch("#3B82F6", 0.3) // "color-mix(in srgb, #3B82F6 30%, transparent)" */ declare function colorMixSwatch(color: string, fillOpacity?: number): string; /** * CSS variables that re-point the primary token at an arbitrary brand color. * * Returns an empty object when `brandColor` is unset, so the caller keeps * inheriting `--primary` from the nearest ThemeProvider — that is the * "follow tenant theme color" mode, expressed as the absence of an override. * * `--primary-foreground` is derived from the brand color via `getContrastText`, * which is what keeps header and bubble text readable on light brand colors. * An unparseable hex is treated like no color at all rather than throwing, so a * half-typed value in a color input can never blank out the surface. */ declare function resolveBrandVars(brandColor?: string): Record; /** Parsed OKLCH components as numbers (not a CSS string). */ interface OklchComponents { /** Lightness: 0 (black) – 1 (white) */ L: number; /** Chroma: 0 (grey) – ~0.4 (max saturation) */ C: number; /** Hue angle in degrees: 0–360 */ H: number; } /** Convert hex to individual OKLCH components. */ declare function hexToOklchComponents(hex: string): OklchComponents; /** Convert hex to oklch() CSS string */ declare function hexToOklch(hex: string): string; /** * Generate an 11-step Tailwind-style primary shade palette from a hex color. * * Returns CSS-variable key/value pairs ready to be spread into an inline * style object or injected via ThemeProvider: * * ```ts * { "--primary-50": "oklch(0.971 0.104 163.0)", "--primary-100": "...", … } * ``` * * Each shade keeps the hue of the base color and linearly scales chroma down * for very light (≥ 0.87) and very dark (≤ 0.35) stops to stay in-gamut. */ declare function generatePrimaryShades(hex: string): Record; export { type OklchComponents, colorMixSwatch, generatePrimaryShades, getContrastText, getLuminance, hexToOklch, hexToOklchComponents, hexToRgb, resolveBrandVars };