reablocks
Version:
Component library for React
28 lines (27 loc) • 703 B
TypeScript
/**
* Options for color generation from string
*/
export interface ColorOptions {
/**
* Saturation value (0-100), defaults to 65
* @default 65
*/
saturation?: number;
/**
* Lightness value (0-100), defaults to 50
* @default 50
*/
lightness?: number;
/**
* Alpha value (0-100), defaults to 100 (opaque)
* @default 100
*/
alpha?: number;
}
/**
* Generates a consistent color from a string input
* @param input - The string to generate a color from
* @param options - Optional color customization options
* @returns HSL or HSLA color string
*/
export declare function generateColor(input: string, options?: ColorOptions): string;