Color converter
Convert 3- or 6-digit HEX to RGB and HSL for CSS. Compare exact sRGB channel values with rounded HSL and see a color preview.
Color & designCompare two solid HEX colors using WCAG contrast ratios. Check AA and AAA normal/large text thresholds with examples and clear accessibility limits.
Ready when you are.
Using the default settings. You can try the same input in the workspace.
Text: #202332; background: #ffffff
15.58:1 contrast ratio AA normal text (4.5:1): Pass AA large text (3:1): Pass AAA normal text (7:1): Pass AAA large text (4.5:1): Pass Large text: at least 18 pt regular or 14 pt bold.
Choose Text color and Background color, then select Run tool. Read the ratio and four AA/AAA text results, and inspect the preview. After changing a color, run again; the previous result is marked stale.
Measures sRGB colors with WCAG relative luminance, compositing optional foreground opacity over an opaque background. It does not inspect a page, infer font size or test images, gradients, focus states or full accessibility.
No. It reports all four normal/large-text thresholds. You must check the actual rendered font size and weight to choose the applicable criterion. The preview is illustrative, not an automatic page audit.
No. This tool processes your input in your browser. We don't store your text, files or results. Standard website access logs are separate; read our privacy notes.
Yes. No account, subscription or usage credits are required.
Use Copy or Download after running the tool. Inputs are not saved automatically and disappear when you leave or refresh the page.
WCAG AA requires at least 4.5:1 for normal text and 3:1 for large text; AAA requires 7:1 and 4.5:1 respectively. Large text means at least 18 pt regular or 14 pt bold, approximately 24 CSS px or 18.67 CSS px. A bold label is not automatically large. The separate non-text contrast criterion generally requires 3:1 for visual information needed to identify active controls and meaningful graphics against adjacent colors, with exceptions; this tool reports text criteria, not a component audit.
Black #000000 on white #FFFFFF gives 21.00:1 and passes all four text checks. Equal foreground/background colors give 1.00:1 and fail all four. #777777 on white gives 4.48:1: AA normal text fails, AA large text passes, and both AAA checks fail. #767676 on white gives 4.54:1: AA normal and large pass, AAA normal fails and AAA large passes.
sRGB channels are linearized, then combined as relative luminance using weights 0.2126 red, 0.7152 green and 0.0722 blue. The ratio is (lighter luminance + 0.05) / (darker luminance + 0.05). The displayed ratio has two decimal places, but pass/fail uses the unrounded value. Do not round a borderline result up to claim a pass. Swapping text and background gives the same mathematical ratio, although their visual roles change.
For text over a gradient or image, check the actual colors behind every part of the text; an endpoint pair alone does not establish a pass. Composite translucent colors against their real background before testing. Review hover, focus, disabled states, font weight, zoom and keyboard access separately. A passing pair does not prove WCAG conformance for a page or site.
Use the color pickers or Lighter/Darker steps, then run the calculation again. Foreground opacity is composited over the chosen background before calculating contrast. The normal and large text samples show the effective colors; test the actual page and states as well.
Build a design check: normalize a HEX color, create a gradient background, then check text contrast. Use repeatable placeholder paragraphs to test the actual layout. Copy values before switching tools; no input is transferred automatically.
Method references: WCAG 2.2 minimum text contrast, enhanced text contrast, non-text contrast, and CSS linear-gradient direction and stops.
Something not right? Report a problem with this tool. Include the steps, but never passwords or private input.
Convert 3- or 6-digit HEX to RGB and HSL for CSS. Compare exact sRGB channel values with rounded HSL and see a color preview.
Color & designCreate linear or radial CSS gradients with two to four color stops, custom positions and opacity. Preview the result and copy or download CSS.
Color & designCompress images toward a maximum KB size or choose quality. Keep dimensions, check actual bytes and download JPEG/WebP batches locally without uploading.
Image tools