colorContrast.js 2.0 turns the original background-brightness utility into a full JavaScript color contrast toolkit.
It handles:
• WCAG AA and AAA checks
• Automatic foreground color selection
• HEX, HSL, OKLCH, Lab, Display P3, and other CSS colors
• Transparency compositing
• Palette contrast matrices
• Live DOM element analysis
• TypeScript declarations
• A separate legacy jQuery build
Useful for theme editors, design systems, accessibility tools, and any UI with dynamic colors.
Top comments (0)