UNPKG

allc

Version:

A small typescript package for color conversion.

34 lines 1.66 kB
/** * Calculates the CSS representation of the given sRGB color. * * @param r The red component of sRGB, typically in the range [0, 1]. * @param g The green component of sRGB, typically in the range [0, 1]. * @param b The blue component of sRGB, typically in the range [0, 1]. * @param withAlpha The alpha component of the color, range [0, 1], defaults to 1. * * @returns The CSS representation of the color. */ export declare const toCSSFromSRGB: (r: number, g: number, b: number, withAlpha?: number) => string; /** * Calculates the CSS representation of the given Display P3 color. * * @param r The red component of Display P3, typically in the range [0, 1]. * @param g The green component of Display P3, typically in the range [0, 1]. * @param b The blue component of Display P3, typically in the range [0, 1]. * @param withAlpha The alpha component of the color, range [0, 1], defaults to 1. * * @returns The CSS representation of the color. */ export declare const toCSSFromDisplayP3: (r: number, g: number, b: number, withAlpha?: number) => string; /** * Calculates the CSS representation of the given Adobe RGB color. * * @param r The red component of Adobe RGB, typically in the range [0, 1]. * @param g The green component of Adobe RGB, typically in the range [0, 1]. * @param b The blue component of Adobe RGB, typically in the range [0, 1]. * @param withAlpha The alpha component of the color, range [0, 1], defaults to 1. * * @returns The CSS representation of the color. */ export declare const toCSSFromAdobeRGB: (r: number, g: number, b: number, withAlpha?: number) => string; //# sourceMappingURL=to-css.d.ts.map