About this tool
Paste a colour in any format — #112D93, rgb(17 45 147), hsl(227 79% 32%) or a CSS name like “teal” — and get every other format.
How to use the Color Code Converter
- Enter the colour (hex, rgb(), hsl() or name).
- The result updates instantly, with the working shown underneath.
- Use Copy to grab a result, or Reset to start again.
How it works
Input is parsed to RGB(A), then converted. Contrast ratios follow WCAG 2.x.
Examples
Brand blue
#112D93 = rgb(17, 45, 147) = hsl(227, 79%, 32%). It has a contrast ratio above 10:1 against white, so it passes WCAG AAA for body text.
CSS name
“teal” = #008080 = rgb(0, 128, 128).
Benefits and use cases
- Every common format in one place
- WCAG contrast check against white and black
- Copy any value with one click
Frequently asked questions
Does it support transparency?
Yes — 8-digit HEX, rgba() and hsla() keep their alpha value.
What contrast ratio do I need?
WCAG 2.x requires at least 4.5:1 for normal text and 3:1 for large text at level AA; level AAA raises these to 7:1 and 4.5:1.