import { SeededRandom } from './seededRandom.js'; /** * Color value - hex string, CSS color, or RGB array */ export type ColorValue = string | [number, number, number]; /** * Color palette - single color, array of colors, or array of color arrays * Arrays support interpolation between colors */ export type ColorPalette = ColorValue | ColorValue[] | ColorValue[][]; /** * Standard color options for themes */ export interface ColorOptions { /** Background color(s) - single color, array, or array of arrays */ background?: ColorPalette; /** Foreground color(s) - single color, array, or array of arrays */ foreground?: ColorPalette; /** Enable color interpolation for arrays (default: true) */ interpolate?: boolean; /** Random hue variation in degrees 0-360 (default: 0) */ hueVariation?: number; /** Random saturation variation 0-100 (default: 0) */ saturationVariation?: number; /** Random lightness variation 0-100 (default: 0) */ lightnessVariation?: number; } /** * Internal RGB color representation */ export interface Color { r: number; g: number; b: number; } /** * Parse color value to RGB */ export declare function parseColor(value: ColorValue): Color; /** * Convert Color to CSS string */ export declare function colorToString(color: Color): string; /** * Convert RGB to HSL */ export declare function rgbToHsl(color: Color): { h: number; s: number; l: number; }; /** * Convert HSL to RGB */ export declare function hslToRgb(h: number, s: number, l: number): Color; /** * Interpolate between two colors in RGB space */ export declare function interpolateColors(color1: Color, color2: Color, t: number): Color; /** * Apply random variations to color */ export declare function varyColor(color: Color, random: SeededRandom, options: Pick): Color; /** * Pick background color */ export declare function pickBackgroundColor(options: ColorOptions, random: SeededRandom): Color; /** * Pick foreground color */ export declare function pickForegroundColor(options: ColorOptions, random: SeededRandom): Color; /** * Pick multiple colors from palette * @param count - Number of colors to pick * @param source - Pick from 'foreground' or 'background' (default: 'foreground') */ export declare function pickColors(options: ColorOptions, random: SeededRandom, count: number, source?: 'foreground' | 'background'): Color[]; //# sourceMappingURL=colors.d.ts.map