@furystack/shades-common-components
Version:
Common UI components for FuryStack Shades
10 lines • 596 B
TypeScript
/**
* Returns a contrasting text color (bright or dark) for a given background color.
* Uses the YIQ luminance formula to determine whether the background is light or dark.
* @param color The background color string
* @param bright The color to return for light backgrounds (defaults to '#000000')
* @param dark The color to return for dark backgrounds (defaults to '#FFFFFF')
* @returns The bright or dark color that best contrasts the background
*/
export declare const getTextColor: (color: string, bright?: string, dark?: string) => string;
//# sourceMappingURL=get-text-color.d.ts.map