/** * Represents a color in various formats that can be processed. */ export type ColorInput = string | [number, number, number] | { r: number; g: number; b: number; }; /** * Internal representation of a color as an RGBA object with values from 0 to 255. */ interface RGBAColor { r: number; g: number; b: number; a: number; } /** * Blending modes for mixing colors. */ export type BlendMode = 'average' | 'additive' | 'multiply' | 'screen' | 'overlay' | 'difference' | 'lighten' | 'darken'; /** * Options for the color mixing process. */ export interface MixOptions { /** The blending algorithm to use. Defaults to 'average'. */ mode?: BlendMode; /** The color space in which to perform the mixing. 'lab' is more perceptually uniform. Defaults to 'rgb'. */ space?: 'rgb' | 'lab'; /** The desired output format. Defaults to 'hex'. */ output?: 'hex' | 'rgba_string' | 'rgb_array'; } /** * Parses any supported color format into a consistent RGBA object. */ export declare function normalizeColor(color: ColorInput): RGBAColor; /** * Applies a single blend function to two colors. * Color channels are normalized to 0-1 for calculations. */ export declare function blend(base: RGBAColor, blend: RGBAColor, mode: BlendMode): RGBAColor; /** * Formats the final RGBA color into the desired output format. */ export declare function formatOutput(color: RGBAColor, format: MixOptions['output']): string | [number, number, number]; /** * The main color mixing engine. Mixes an array of colors using various options. * This is a more powerful and flexible replacement for the original MixColor function. * * @param colors An array of colors in any supported format. * @param options Configuration for the mixing process. * @returns The final mixed color in the specified output format. */ export declare function mix(colors: ColorInput[], options?: MixOptions): string | [number, number, number]; /** * An alias for the more powerful `mix` function, for backward compatibility * and to fulfill the original naming request. * Mixes multiple colors together by averaging their RGB components by default. * * @param {...ColorInput[]} colors - A variable number of Color inputs to mix. * @returns {string | [number, number, number]} The resulting mixed color, as a hex string by default. */ export declare function MixColor(...colors: ColorInput[]): string | [number, number, number]; export {};