UNPKG

wcag-color

Version:

Color constrast helpers to achieve the WCAG 2.0 standard

6 lines (5 loc) 373 B
export type Score = 'Fail' | 'AA Large' | 'AA' | 'AAA' export declare const ratio: (foreground: string, background: string) => number export declare const score: (foreground: string, background: string) => Score export declare const scoreFromRatio: (ratio: number) => Score export declare const best: (firstColor: string, secondColor: string, background: string) => string