UNPKG

1.11 kBTypeScriptView Raw
1import { RGBColor, RGBAColor, HSBColor, HSBAColor, HSLColor, HSLAColor } from './color-types';
2export declare function rgbString(color: RGBColor | RGBAColor): string;
3export declare const rgbaString: typeof rgbString;
4export declare function rgbToHex({ red, green, blue }: RGBColor): string;
5export declare function hsbToHex(color: HSBColor): string;
6export declare function hsbToRgb(color: HSBColor): RGBColor;
7export declare function hsbToRgb(color: HSBAColor): RGBAColor;
8export declare function hslToRgb(color: HSLColor): RGBColor;
9export declare function hslToRgb(color: HSLAColor): RGBAColor;
10export declare function rgbToHsb(color: RGBColor): HSBColor;
11export declare function rgbToHsl(color: RGBColor): HSLAColor;
12export declare function hexToRgb(color: string): {
13 red: number;
14 green: number;
15 blue: number;
16};
17export declare enum ColorType {
18 Hex = "hex",
19 Rgb = "rgb",
20 Rgba = "rgba",
21 Hsl = "hsl",
22 Hsla = "hsla",
23 Default = "default"
24}
25export declare function hslToString(hslColor: HSLAColor | string): string;
26export declare function colorToHsla(color: string): HSLAColor;