UNPKG

@aplus-frontend/ui

Version:

8 lines (7 loc) 305 B
/** * Convert a hex color code to an RGBA color string. * @param hex - The hex color code, e.g. "#ff00ff" or "#f0f". * @param alpha - The alpha value (optional), default is 1 (fully opaque). * @returns The RGBA color string. */ export declare function hexToRgba(hex: string, alpha?: number): string;