UNPKG

allc

Version:

A small typescript package for color conversion.

45 lines 1.92 kB
/** * Calculates the CSS representation of the given Oklab color. * * @param l The luminance component of Oklab, range [0, 1]. * @param a The a component of Oklab, unbounded. * @param b The b component of Oklab, unbounded. * @param withAlpha The alpha component of the color, range [0, 1], defaults to 1. * * @returns The CSS representation of the color. */ export declare const toCSSFromOklab: (l: number, a: number, b: number, withAlpha?: number) => string; /** * Calculates the CSS representation of the given CIELAB color. * * @param l The luminance component of CIELAB, range [0, 1]. * @param a The a component of CIELAB, unbounded. * @param b The b component of CIELAB, unbounded. * @param withAlpha The alpha component of the color, range [0, 1], defaults to 1. * * @returns The CSS representation of the color. */ export declare const toCSSFromCIELAB: (l: number, a: number, b: number, withAlpha?: number) => string; /** * Calculates the CSS representation of the given Oklch color. * * @param l The luminance component of Oklch, range [0, 1]. * @param c The a component of Oklch, unbounded. * @param h The b component of Oklch, unbounded. * @param withAlpha The alpha component of the color, range [0, 1], defaults to 1. * * @returns The CSS representation of the color. */ export declare const toCSSFromOklch: (l: number, c: number, h: number, withAlpha?: number) => string; /** * Calculates the CSS representation of the given CIELCH color. * * @param l The luminance component of CIELCH, range [0, 1]. * @param c The a component of CIELCH, unbounded. * @param h The b component of CIELCH, unbounded. * @param withAlpha The alpha component of the color, range [0, 1], defaults to 1. * * @returns The CSS representation of the color. */ export declare const toCSSFromCIELCH: (l: number, c: number, h: number, withAlpha?: number) => string; //# sourceMappingURL=to-css.d.ts.map