UNPKG

contrastrast

Version:

A lightweight tool that parses color strings and recommends text contrast based on WCAG Standards

9 lines 452 B
import { Contrastrast } from "../contrastrast.js"; /** * Calculate the WCAG 2.1 contrast ratio between two colors * @param color1 First color (Contrastrast instance or color string) * @param color2 Second color (Contrastrast instance or color string) * @returns Contrast ratio (1:1 to 21:1) */ export declare const contrastRatio: (color1: Contrastrast | string, color2: Contrastrast | string) => number; //# sourceMappingURL=contrastRatio.d.ts.map