Color Contrast Calculator
Color Contrast Calculator
How Contrast Ratio Is Computed
WCAG 2.x defines contrast ratio using relative luminance, which accounts for the nonlinear way human vision perceives brightness. Each sRGB channel is first linearized: c/12.92 when c ≤ 0.03928, otherwise ((c + 0.055)/1.055)^2.4. Luminance L = 0.2126R + 0.7152G + 0.0722B. The ratio is (L_light + 0.05) / (L_dark + 0.05).
WCAG Requirements
AA: 4.5:1 for normal text, 3.0:1 for large text (18pt or 14pt bold). AAA: 7.0:1 for normal text, 4.5:1 for large text. UI components and graphical objects need 3.0:1. This color contrast calculator checks every combination so you can pick the right level for each element.
Practical Guidance
Dark text on light backgrounds is the most reliable pattern. For white backgrounds, text at or darker than #767676 passes AA normal. Avoid pure black-on-white extremes in large areas — they cause afterimages — and never rely on color alone to convey meaning; combine contrast compliance with labels, icons, and patterns.
Frequently Asked Questions
Related Calculators
Home Loan Calculator
Calculate home loan EMI, total interest, and amortization schedule.
Auto Loan Calculator
Detailed auto loan with trade-in, taxes, fees, and amortization.
Bike Loan Calculator
Calculate bike loan EMI, total cost, and repayment breakdown.
Boat Loan Calculator
Estimate boat financing payments, interest, and amortization.
Student Loan Calculator
Calculate student loan payments with income-driven repayment plans.
Gold Loan Calculator
Calculate gold loan amount based on gold weight, purity, and LTV ratio.
USDA Loan Calculator
Calculate USDA loan payments with guarantee fee and income eligibility.
Loan Against Property Calculator
Calculate LAP EMI based on property value and loan-to-value ratio.