UNPKG

color2k

Version:

a color parsing and manipulation lib served in roughly 2kB

7 lines (6 loc) 269 B
/** * Returns the contrast ratio between two colors based on * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef). */ declare function getContrast(color1: string, color2: string): number; export default getContrast;