UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

10 lines (9 loc) 493 B
/** * Get the accessible foreground color based on the background color and text size. * Returns either white or black based on the contrast ratio. * @param backgroundColor the background color in hex format * @param largeText whether the text is large * @param strict whether to use strict contrast (i.e. WCAG AA or AAA) */ declare function getAccessibleForegroundColor(backgroundColor: string, largeText: boolean, strict: boolean): string; export default getAccessibleForegroundColor;