@akashshyam/color-utilities
Version:
A handy, tiny utility library compatible with typescript. We offer color conversions, color validation, constrast comparison etc
19 lines (18 loc) • 536 B
TypeScript
/**
* Validate if string is hexadecimal
* @param hex string
* @returns a boolean stating if the string is a valid hex
*/
export declare function validateHex(hex: string): boolean;
/**
* Validate if string is rgb
* @param rgb string
* @returns a boolean stating if the string is a valid rgb
*/
export declare function validateRGB(rgb: string): boolean;
/**
* Validate if string is hsl
* @param hsl string
* @returns a boolean stating if the string is a valid hsl
*/
export declare function validateHSL(hsl: string): boolean;