@fewings/core
Version:
Useful pure functions for frontend development
12 lines (10 loc) • 501 B
TypeScript
/**
* Adjusts a HEX color's brightness, supporting 3-character (#RGB), 6-character (#RRGGBB),
* and 8-character (#RRGGBBAA) formats.
* @param color - The HEX color to adjust (e.g., "#RGB", "#RRGGBB", "#RRGGBBAA").
* @param weight - The amount to adjust the brightness (-100 to 100).
* Positive values make the color brighter, negative values make it darker.
* @returns The adjusted HEX color.
*/
declare function shade(color: string, weight: number): string;
export { shade };