import { HSL, LCH, Lab, RGB, XYZ } from './Color.types'; /** * Converts an RGB color value to LCH color space. * * @param RGB - An array containing the red, green, and blue color values, each ranging from 0 to 255. * @returns An array containing the lightness (L), chroma (C), and hue (H) values. */ export declare function RGBtoLCH({ r: $r, g: $g, b: $b }: RGB): LCH; /** * Converts an RGB color value to its hexadecimal string representation. * * @param RGB - An array containing the red, green, and blue color values. * Each value should be an integer between 0 and 255. * @returns The hexadecimal string representation of the RGB color. */ export declare function RGBtoHEX({ r: $r, g: $g, b: $b }: RGB): string; /** * Converts an RGB color value to HSL. * * @param RGB - An array containing the red, green, and blue color values. Each value should be in the range [0, 255]. * @returns An array containing the hue, saturation, and lightness values. * Hue is in the range [0, 360], and saturation and lightness are in the range [0, 100]. */ export declare function RGBtoHSL({ r: $r, g: $g, b: $b }: RGB): HSL; /** * Converts an RGB color value to its contrast luminosity. * * The function takes an RGB color value represented as an array of three numbers, * each ranging from 0 to 255, and converts it to a contrast luminosity value. * * The conversion process involves normalizing the RGB values to a range of 0 to 1, * applying a gamma correction, and then calculating the luminosity using the * standard luminosity coefficients for red, green, and blue. * * @param RGB - An array of three numbers representing the red, green, and blue * components of the color, each ranging from 0 to 255. * @returns The contrast luminosity value as a number. */ export declare function RGBtoContrastLuminosity({ r, g, b }: RGB): number; /** * Converts a hexadecimal color string to an RGB object. * * @param hex - The hexadecimal color string (e.g., "#FFFFFF"). * @returns An object with the properties `r`, `g`, and `b` representing the red, green, and blue components of the color. */ export declare function HEXtoRGB(hex: string): RGB; /** * Converts an RGB color value to XYZ color space. * * @param rgb - An object containing the red, green, and blue color values, each ranging from 0 to 255. * @returns An object containing the x, y, and z values in the XYZ color space. * * The conversion is based on the sRGB color space and the D65 illuminant. * * @example * ```typescript * const xyz = RGBtoXYZ({ r: 255, g: 0, b: 0 }); * console.log(xyz); // { x: 41.24, y: 21.26, z: 1.93 } * ``` */ export declare function RGBtoXYZ(rgb: RGB): XYZ; /** * Converts a color from the XYZ color space to the CIELAB color space. * * @param xyz - An object containing the x, y, and z values of the color in the XYZ color space. * @returns An object containing the l, a, and b values of the color in the CIELAB color space. * * The conversion assumes the observer is at 2° and the illuminant is D65. * The input values are normalized by dividing by the reference white values: * - x by 95.047 * - y by 100.000 * - z by 108.883 * * The function applies a transformation to each of the normalized values: * - If the value is greater than 0.008856, it is raised to the power of 1/3. * - Otherwise, it is transformed using the formula: 7.787 * value + 16/116. * * The resulting l, a, and b values are calculated as follows: * - l = 116 * y - 16 * - a = 500 * (x - y) * - b = 200 * (y - z) */ export declare function XYZtoLab(xyz: XYZ): Lab; /** * Converts a color from the LAB color space to the LCH color space. * * @param lab - An object representing the LAB color with properties: * - `l`: Lightness component (0 to 100) * - `a`: Green-Red component * - `b`: Blue-Yellow component * @returns An object representing the LCH color with properties: * - `l`: Lightness component (same as input) * - `c`: Chroma component (calculated from `a` and `b`) * - `h`: Hue component in degrees (0 to 360) */ export declare function LabToLCH(lab: Lab): LCH; /** * Converts a HEX color code to LCH color space. * * @param hex - The HEX color code string. * @returns An object containing the LCH color values: * - `l`: Lightness * - `c`: Chroma * - `h`: Hue */ export declare function HEXtoLCH(hex: string): LCH; /** * Converts a HEX color code to an HSL color representation. * * @param hex - The HEX color code string (e.g., "#FFFFFF"). * @returns The HSL color representation. */ export declare function HEXtoHSL(hex: string): HSL;