import type { Flavored } from './types.js'; export type Hsl = readonly [Hue, Saturation, Lightness]; export type Hue = Flavored; export type Saturation = Flavored; export type Lightness = Flavored; export type Rgb = readonly [Red, Green, Blue]; export type Red = Flavored; export type Green = Flavored; export type Blue = Flavored; /** * Converts an RGB color to a hex color. */ export declare const rgb_to_hex: (r: number, g: number, b: number) => number; /** * Converts a hex color to an RGB color. */ export declare const hex_to_rgb: (hex: number) => Rgb; export declare const hex_string_to_rgb: (hex: string) => Rgb; export declare const rgb_to_hex_string: (r: number, g: number, b: number) => string; export declare const to_hex_component: (v: number) => string; /** * Converts an RGB color value to HSL. Conversion formula * adapted from http://wikipedia.org/wiki/HSL_color_space. * Values r/g/b are in the range [0,255] and * returns h/s/l in the range [0,1]. */ export declare const rgb_to_hsl: (r: number, g: number, b: number) => Hsl; /** * Converts an HSL color value to RGB. Conversion formula * adapted from http://wikipedia.org/wiki/HSL_color_space. * Values h/s/l are in the range [0,1] and * returns r/g/b in the range [0,255]. */ export declare const hsl_to_rgb: (h: Hue, s: Saturation, l: Lightness) => Rgb; export declare const hue_to_rgb_component: (p: number, q: number, t: number) => number; export declare const hsl_to_hex: (h: Hue, s: Saturation, l: Lightness) => number; export declare const hsl_to_hex_string: (h: Hue, s: Saturation, l: Lightness) => string; export declare const hsl_to_string: (h: Hue, s: Saturation, l: Lightness) => string; export declare const hex_string_to_hsl: (hex: string) => Hsl; export declare const parse_hsl_string: (hsl: string) => Hsl; //# sourceMappingURL=colors.d.ts.map