Re-scoped from @lilith/ui-theme to @cocotte/ui-theme. In-set cross-package deps re-pointed to @cocotte; out-of-set @lilith deps preserved (same Verdaccio). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
26 lines
No EOL
897 B
TypeScript
26 lines
No EOL
897 B
TypeScript
/**
|
|
* Mix two hex colors together.
|
|
* weight=0 returns color1, weight=1 returns color2.
|
|
*/
|
|
export declare function mix(color1: string, color2: string, weight?: number): string;
|
|
/**
|
|
* Lighten a hex color by mixing it toward white.
|
|
* amount is 0-100 (percentage).
|
|
*/
|
|
export declare function lighten(hex: string, amount: number): string;
|
|
/**
|
|
* Darken a hex color by mixing it toward black.
|
|
* amount is 0-100 (percentage).
|
|
*/
|
|
export declare function darken(hex: string, amount: number): string;
|
|
/**
|
|
* Convert a hex color to an rgba() CSS string.
|
|
* alpha is clamped to 0-1.
|
|
*/
|
|
export declare function rgba(hex: string, alpha: number): string;
|
|
/**
|
|
* Append an alpha channel to a hex color, returning an 8-digit hex string.
|
|
* alpha is clamped to 0-1 and converted to a 0-255 byte.
|
|
*/
|
|
export declare function withAlpha(hex: string, alpha: number): string;
|
|
//# sourceMappingURL=color.d.ts.map
|