Color Code Converter

Convert any colour between HEX, RGB, HSL, HSV and CMYK.

HEX#112d93
RGBrgb(17, 45, 147)
HSLhsl(227, 79%, 32%)
HSV / HSBhsv(227, 88%, 58%)
CMYK (approx.)cmyk(88%, 69%, 0%, 42%)
Contrast with white11.54:1 (AAA)
Contrast with black1.82:1 (fails)
White text
Black text

Runs entirely in your browser — nothing you enter is uploaded.

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

  1. Enter the colour (hex, rgb(), hsl() or name).
  2. The result updates instantly, with the working shown underneath.
  3. 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.