UNPKG

@akashshyam/color-utilities

Version:

A handy, tiny utility library compatible with typescript. We offer color conversions, color validation, constrast comparison etc

13 lines (12 loc) 529 B
/** * Separate an HSL string into it's respective values * @param hslString {string} - a hsl string in format hsl(255, 20%, 25%) * @returns an array of the hue, saturation and lightness i.e. [255, 20, 25] */ export declare function separateHSL(hslString: string): string[]; /** * Separate an RGB string into it's respective values * @param rgbString a rgb string in format rgb(255, 20, 25) * @returns an array of red, green and blue i.e. [255, 20, 25] */ export declare function separateRGB(rgbString: string): string[];