@dcodegroup-au/dsg-vue
Version:
Front-end Vue/Tailwind DSG for UntitledUI.
24 lines (23 loc) • 1 kB
TypeScript
/**
* --------------------------------------------------------------------------
* Function: hexToRGB
* --------------------------------------------------------------------------
* Convert a hex colour to an RGB colour.
*
* @param {string} hex - The hex colour to convert.
* @param {number} alpha - The alpha value to apply.
* @returns {string} - The converted RGB colour.
* --------------------------------------------------------------------------
*/
export declare const hexToRGB: (hex: string, alpha: number) => string;
/**
* --------------------------------------------------------------------------
* Function: isValidHex
* --------------------------------------------------------------------------
* Check if a hex colour is valid.
*
* @param {string} hex - The hex colour to check.
* @returns {boolean} - The result of the check.
* --------------------------------------------------------------------------
*/
export declare const isValidHex: (hex: string) => boolean;