/** * Color utility functions shared across the project. * Extracted from BrandColorsContext to allow reuse and isolated testing. */ /** * Converts a hex color string to its RGB components. * @param hex - Hex color string (with or without leading `#`) * @returns Object with `r`, `g`, `b` values (0–255), or `null` if invalid * * @example * hexToRgb('#3b82f6') // { r: 59, g: 130, b: 246 } * hexToRgb('3b82f6') // { r: 59, g: 130, b: 246 } * hexToRgb('invalid') // null */ export declare function hexToRgb(hex: string): { r: number; g: number; b: number; } | null; /** * Converts RGB components to an `rgba()` CSS string. * @param r - Red (0–255) * @param g - Green (0–255) * @param b - Blue (0–255) * @param alpha - Alpha (0–1), defaults to 1 * * @example * rgbToRgba(59, 130, 246, 0.5) // 'rgba(59, 130, 246, 0.5)' */ export declare function rgbToRgba(r: number, g: number, b: number, alpha?: number): string; /** * Converts a hex color to an `rgba()` CSS string. * Returns `null` if the hex is invalid. * * @example * hexToRgba('#3b82f6', 0.15) // 'rgba(59, 130, 246, 0.15)' */ export declare function hexToRgba(hex: string, alpha?: number): string | null; /** * Determines whether a hex color is considered "light" based on its luminance. * Uses the W3C relative luminance formula. * * @param hex - Hex color string * @returns `true` if the color is light, `false` if dark * * @example * isLightColor('#ffffff') // true * isLightColor('#000000') // false * isLightColor('#3b82f6') // false */ export declare function isLightColor(hex: string): boolean;