Color Converter & Contrast Checker

Paste any CSS color to get every format, or check whether a text/background pair meets WCAG contrast requirements, and get a fix if it doesn’t.

No data leaves your browser

Contrast ratio
CheckNeedsResult
Large text 24px

Normal body text at 15px. The quick brown fox jumps over the lazy dog.

Frequently Asked Questions

What contrast ratio does WCAG require?

WCAG 2.2 level AA needs 4.5:1 for normal text and 3:1 for large text (18pt / 24px, or 14pt / about 18.7px bold) and for UI components and graphics. Level AAA needs 7:1 for normal text and 4.5:1 for large text.

How is the contrast ratio calculated?

Each color's relative luminance L is computed from linearised sRGB (0.2126 R + 0.7152 G + 0.0722 B), and the ratio is (L1 + 0.05) / (L2 + 0.05), with L1 the lighter color. It ranges from 1:1 to 21:1.

What is OKLCH?

A perceptual color space (lightness, chroma, hue) supported in modern CSS as oklch(). Equal steps in lightness look equally different, which makes it good for building palettes.

How is the suggested color chosen?

Hue and saturation stay fixed while lightness is moved the smallest amount that reaches the target ratio, so the fix stays as close as possible to your original color.

More Developer Tools

JSON ToolsFormat, validate, minify & compare JSON JSON FormatterPretty-print and beautify JSON CSV Viewer & EditorView, edit and convert CSV files YAML ConverterConvert YAML to JSON and back Regex TesterTest regular expressions live Text DiffCompare two texts side by side JWT ToolDecode, encode, compare and verify JWTs JWT DecoderInspect JWT header and payload XML FormatterFormat, validate and convert XML URL EncoderEncode, decode and parse URLs Base64Encode and decode Base64 strings Hash GeneratorSHA-256, MD5, HMAC and CRC32 SHA-256Generate SHA-256 checksums MD5 GeneratorGenerate MD5 hash values Text ToolsCase convert, count and transform text Number ConverterBinary, hex and octal converter Token CalculatorEstimate LLM token counts from text PDF EditorEdit text, sign and annotate PDFs Schema GeneratorJSON to TypeScript, Go, Rust, Python IndexNowSubmit URLs to Bing, Yandex & more PII RedactorMask personal data & keys before AI Timestamp ConverterUnix epoch to date and back UUID GeneratorUUID v4/v7, ULID, Nano ID Password GeneratorSecure passwords & passphrases MCP Config BuilderConfigs for Claude, Cursor, VS Code AGENTS.md GeneratorCLAUDE.md, Cursor rules, Copilot AI Crawler Controlsrobots.txt for AI bots & llms.txt Cron ParserExplain crontab, next run times SQL FormatterBeautify & minify SQL queries cURL ConvertercURL to fetch, Python, Go, PHP Chat Export ConverterChatGPT/Claude export to Markdown Markdown PreviewLive GFM preview & to HTML Color & ContrastHEX/RGB/OKLCH, WCAG checker QR Code GeneratorURL, Wi-Fi, vCard; PNG & SVG Tool Schema ConverterOpenAI ↔ Anthropic ↔ Gemini ↔ MCP JSONL ValidatorFine-tuning & batch files SSE Stream ParserReassemble LLM streaming responses Prompt Template & DiffFill {{vars}}, compare versions