Color Converter (HEX, RGB, HSL, CMYK)

Quick answer

The color converter converts a colour between HEX, RGB, HSL, HSV and CMYK, shows a live swatch and calculates WCAG contrast ratios against white and black text. Everything is calculated in your browser; nothing you type is sent to our server.

Colour
—
HEX
—
RGB
—
HSL
—
HSV / HSB
—
CMYK
—
Decimal value
—
Contrast with white
—
Contrast with black
—
Readable text colour
—

Designers, developers and printers describe colours in different systems: HEX and RGB for screens, HSL and HSV for picking shades, CMYK for print. This converter translates between all of them and checks text contrast for accessibility.

How to use the Color Converter

  1. Input format
  2. Colour

Everything runs in your browser, so results appear instantly and nothing you type is sent to a server.

How it works

Your colour is parsed in the format you choose and converted to RGB first; every other notation is computed from RGB. CMYK here is a simple device-independent conversion; professional printing uses colour profiles that can shift the values.

Formula

HEX: each pair of hex digits = one RGB channel (00–FF = 0–255)HSL/HSV from RGB via the standard hexcone formulasCMYK: K = 1 − max(R,G,B)/255

Worked example

Inputs — Input format: HEX (#RRGGBB); Colour: #1E90FF.
Results — HEX = #1E90FF; RGB = rgb(30, 144, 255); HSL = hsl(210, 100%, 56%); HSV / HSB = hsv(210, 88%, 100%); CMYK = cmyk(88%, 44%, 0%, 0%); Decimal value = 2,003,199.

Key terms

HEX code
A colour written as #RRGGBB in hexadecimal.
Contrast ratio
WCAG measure of luminance difference between text and background, from 1:1 to 21:1.

Frequently asked questions

How do I convert HEX to RGB?

Split the code into three pairs and convert each from base 16 to base 10: FF = 255.

What contrast ratio do I need for text?

WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.

Can I enter a 3-digit HEX code?

Yes: #F80 is read as #FF8800.

What formula does the Color Converter use?

HEX: each pair of hex digits = one RGB channel (00–FF = 0–255).

Sources

  1. W3C – Web Content Accessibility Guidelines 2.1, Contrast (Minimum)
  2. W3C – CSS Color Module Level 4

Cite this calculator

Speedy Calculator. (2026). Color Converter (HEX, RGB, HSL, CMYK). Speedy Calculator. https://speedycalculator.com/calculators/conversion/color-converter/