All tools Color converter and contrast checker How to use this tool Choose HEX, RGB or HSL and enter one source color. RGB components must be integers from 0 to 255; HSL hue is 0 to 360 and saturation/lightness are percentages from 0 to 100.
Enter an opaque background HEX color, or leave it blank to use white.
Select Convert color and check contrast. Review both the converted values and the separate normal-text and large-text contrast results.
Scope and limits Only opaque sRGB HEX, comma-separated RGB and comma-separated HSL are accepted. Alpha transparency, named colors, gradients, images, wide-gamut spaces and modern space/slash CSS syntax are unsupported.
Contrast uses WCAG relative luminance with the 0.04045 sRGB transfer-function threshold. AA normal text requires 4.5:1; AA large text 3:1; AAA normal text 7:1; AAA large text 4.5:1. Pass/fail uses the unrounded ratio, never its displayed rounded value.
Large text means at least 18 point, or at least 14 point bold (approximately 24 CSS px or 18.67 CSS px bold). This two-color calculation does not determine font size, font weight, transparency, anti-aliasing, UI component applicability or overall accessibility conformance. Displayed conversions are rounded and can differ slightly when pasted back.
Inputs start empty. Load example fills them only when you choose it. Reset clears every text field and output. Cancel stops the worker and keeps your input.
Processing runs locally. This tool does not upload or autosave your input. The site can load consent-controlled third-party services; use nonsensitive test input and keep passwords, tokens and personal records out of these fields.
Reference: WCAG contrast requirements .
Enable JavaScript to calculate results. The worked example and limits below remain readable. Worked example Input and settings Source format: HEX
Source color: #000000
Background: #ffffff Result HEX: #000000
RGB: rgb(0, 0, 0)
HSL: hsl(0, 0%, 0%)
Background: #FFFFFF
Contrast ratio (approx.): 21:1
Normal text AA (4.5:1): PASS
Normal text AAA (7:1): PASS
Large text AA (3:1): PASS
Large text AAA (4.5:1): PASS Opaque black on opaque white has a contrast ratio of 21:1, meeting the WCAG AA and AAA thresholds for normal and large text. The tool uses the unrounded ratio for every threshold decision.