UNPKG

css-color-to-rgb

Version:

A utility library to convert CSS color values into an RGB array and hex code. Supports CSS color names, hex values, RGB, HSL, CSS variables and modern CSS color functions such as color-mix() and color().

6 lines (5 loc) 225 B
export declare function cssColorToRgb(cssColorValue: string, options?: { force?: boolean; element?: HTMLElement; }): number[]; export declare function cssColorToHex(...args: Parameters<typeof cssColorToRgb>): string;