export interface ColorPalette { name: string; hex: string; rgb: [number, number, number]; } export declare const DESIGN_PALETTE: ColorPalette[]; /** * Convert hex color to RGB */ export declare function hexToRgb(hex: string): [number, number, number]; /** * Calculate contrast ratio between two colors */ export declare function getContrastRatio(color1: [number, number, number], color2: [number, number, number]): number; /** * Pick the readable foreground shade for an arbitrary background hex — 'dark' * when dark text has the better WCAG contrast on it, 'light' otherwise. * Callers map the result to an ODS THEME, not to color literals (e.g. the * announcement bar scopes its content with .theme-light when the background * needs dark-on-light, .theme-dark otherwise — every color then resolves * from the active theme's own tokens). */ export declare function pickReadableTextColor(bgHex: string): 'dark' | 'light'; /** * Extract dominant color from image canvas */ export declare function extractDominantColor(canvas: HTMLCanvasElement): [number, number, number]; /** * Find the best contrasting color from the design palette */ export declare function getBestContrastColor(imageColor: [number, number, number]): ColorPalette; /** * Load image and analyze its dominant color */ export declare function analyzeImageColor(imageSrc: string): Promise; /** * Extract the dominant edge/corner color from an image URL. * Used for background fill behind images in emails and cards. * Client-side only (uses canvas). Returns hex color string. */ export declare function extractImageEdgeColorAsync(imageUrl: string): Promise; //# sourceMappingURL=color-analysis.d.ts.map