रंग कंट्रास्ट अनुपात कैलकुलेटर और WCAG 2.1 पहुंच योग्यता
रंग कंट्रास्ट अनुपात कैलकुलेटर और WCAG 2.1 पहुंच योग्यता
यह टूल 100% आपके ब्राउज़र में सुरक्षित रूप से चलता है। आपका कोड, टोकन और संवेदनशील डेटा कभी भी बाहरी सर्वर पर अपलोड नहीं होता।
मूल वास्तुकला और गणितीय सूत्र
Contrast Ratio = (L1 + 0.05) / (L2 + 0.05)
Where L1 is the relative luminance of the lighter color and L2 is the luminance of the darker color. The resulting ratio ranges from 1:1 (no contrast, white on white) to 21:1 (maximum contrast, black on white).
सर्वोत्तम अभ्यास और आवश्यक दिशानिर्देश
- Aim for AA Compliance (4.5:1): The Web Content Accessibility Guidelines (WCAG) Level AA requires a minimum ratio of 4.5:1 for standard body text, and 3:1 for large text (usually 18pt or 14pt bold).
- Don't Rely Solely on Color for Meaning: Colorblind users cannot distinguish certain hues (like red error states versus green success states). Always pair color changes with iconography, underlines, or structural changes.
- Account for Dark Mode Reversals: A high contrast palette in Light Mode often fails catastrophically when mathematically inverted for Dark Mode. You must manually check the contrast ratios for both distinct themes.