Colour Converter & WCAG Contrast Checker
ConversionEverything runs locally in your browser — nothing is uploaded
Large sample text
Body sample: treat this paragraph as your real content and see how hard it is to read against this background.
–
- AA body text (≥ 4.5:1)–
- AAA body text (≥ 7:1)–
- AA large text (≥ 3:1)–
- AAA large text (≥ 4.5:1)–
Move a colour between HEX, RGB, HSL and HSV — change any one value and the rest follow. The picker and the text fields stay in sync, and pasted values work with or without a leading #, as do rgb() and hsl() forms. Below that sits a WCAG contrast check: it computes the real ratio between the foreground and background and tells you whether body text and large text clear AA and AAA. The grey that “looks fine” in a mockup is very often short of 4.5:1.
Features
- HEX, RGB, HSL and HSV conversions shown together, each copyable on its own
- 3, 4, 6 and 8-digit hex plus rgba / hsla alpha
- Picker, text fields and preview stay in sync; one click swaps foreground and background
- WCAG contrast ratio with four verdicts: AA 4.5:1, AAA 7:1, large-text AA 3:1 and large-text AAA 4.5:1
- Suggests the most readable text colour for the chosen background, with its ratio
- Says plainly when contrast is computed on the opaque colour because the foreground has alpha
How to use
- Type a colour value or pick one with the swatch
- Set the foreground and background separately — the preview sits between them
- Read the converted values and the four contrast verdicts below
- Use the copy button on any row to take that single format
FAQ
- What is the difference between HSL and HSV?
- Both are hue plus two components, but the second component differs: HSL’s L is lightness, where L=100% is always white; HSV’s V is value, where V=100% is the pure hue. Picker panels usually work in HSV because it is easier to aim, while CSS authors tend to use HSL.
- What contrast ratio do I need?
- WCAG 2 AA requires at least 4.5:1 for body text and 3:1 for large text (roughly 24px, or 18.66px bold and up). AAA raises those to 7:1 and 4.5:1. The ratio comes from the relative luminance of the two colours and is independent of font and size.
- Why does this differ slightly from other tools?
- Rounding. This tool uses the formula as written in the WCAG specification and displays two decimals. When a ratio sits right at 4.5 or 7, that small difference can flip the verdict — take the more conservative reading in that case.
- How is contrast handled for a semi-transparent colour?
- It is computed on the opaque value, and the tool says so. What you actually see depends on whatever sits behind the colour, so a strict figure would require compositing against the background first — treat the number as a guide.
Related tools
Unit Converter
ConversionConvert between units of length, weight, temperature, volume and more, seeing one value in every unit of its category at once, all in your browser.
Number Base Converter
ConversionConvert numbers between binary, octal, decimal, hex and base 36, with long IDs converted digit for digit. Runs entirely in your browser.
CSS Formatter
FormattingFormat CSS online: one declaration per line, selectors split at commas. Minify only strips structural whitespace, keeping meaningful spaces in values.
Timestamp Converter
ConversionConvert Unix timestamps into readable dates and back, with seconds and milliseconds told apart, a time zone picker and batch mode. Runs in your browser.
Date Calculator
ConversionCount the days, weeks or months between two dates, or shift a date by any of those. Dates can be picked from a calendar or pasted in — nothing is uploaded.
Cron Parser
ConversionExplain a cron expression field by field and list its next run times, saying plainly when a schedule can never fire. Runs entirely in your browser.