Convert Color Codes

  • hex#29a9e1
  • rgbrgb(41, 169, 225)
  • hslhsl(198, 75%, 52%)
  • hsvhsv(198, 82%, 88%)
  • cmykcmyk(82%, 25%, 0%, 12%)

CMYK here is a simple conversion for reference. Printers use color profiles, so ask your print shop for exact values.

White text · 2.67:1
Black text · 7.86:1

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

Paste a HEX code from a design file, an rgb() value from CSS or a color name, and get every other format ready to copy. The preview shows how white and black text read on it.

  • Free
  • Runs in your browser
  • HEX, RGB, HSL, HSV, CMYK
  • No sign-up
How it works

How It Works

Convert a color in three steps.

01

Enter a color

Type or paste any format, or use the picker.

02

See every format

HEX, RGB, HSL, HSV and CMYK appear at once.

03

Copy the value

Each format has its own copy button.

About

Which color format should you use?

All of these describe the same sRGB color in different ways. HEX is the most compact and common in design tools. RGB gives the red, green and blue channels from 0 to 255. HSL (hue, saturation, lightness) is easier to adjust by hand: change only the lightness for a darker or lighter shade. HSV, also called HSB, is what most color pickers use. CMYK describes ink percentages for print.

HSL and HSV values are rounded to whole numbers, so converting back can shift a HEX value by one step in a channel. Keep the HEX or RGB value as your source of truth.

Reads many formats

#rgb, #rrggbb, #rrggbbaa, rgb() and rgba() with commas or spaces, hsl(), hsv() and about 35 common color names.

Alpha kept

Transparent colors keep their alpha in HEX (8 digits), rgba() and hsla().

Text contrast

Shows the WCAG contrast ratio of white and black text on the color.

Color picker

Pick a color visually if you do not have a code yet.

Features

Why Use This Color Converter

Every format from one input.

Five formats

HEX, RGB, HSL, HSV and CMYK side by side.

Accessibility check

See at a glance whether white or black text is readable on the color.

CSS-ready

Outputs are valid CSS for HEX, rgb() and hsl().

Private

Runs in your browser.

✓ No Registration✓ Free✓ Browser-based✓ Text Stays Local
FAQ

Frequently Asked Questions

Questions people ask about the Color Converter.

Split the six digits into three pairs and convert each pair from hex to decimal: #29A9E1 is 29, A9, E1, which gives rgb(41, 169, 225). Paste it here and the tool does it for you.