Back to Home
Blog

Color Converter

Convert HEX, RGB, and HSL color codes

Color Input

#3B82F6

Color Formats

HEX
#3B82F6
RGB
rgb(59, 130, 246)
HSL
hsl(217, 91%, 60%)
HSV
hsv(217, 76%, 96%)
CMYK
cmyk(76%, 47%, 0%, 4%)

Contrast Analysis

Sample Text
Ratio: 3.68:1 ❌ Poor
Sample Text
Ratio: 5.71:1 ✅ WCAG AA
Sample Text
Ratio: 1.07:1 ❌ Poor
WCAG AA requires 4.5:1 for normal text, 3:1 for large text

Generated Palette

#052861
#0950C3
#3C83F6
#9EC1FA
#CEE0FD

Named Colors

Material Design Colors

About the Color Converter

Designers and developers rarely think in just one color format. A CSS file might call for a HEX code like #3B82F6, a design tool might report the same color as RGB(59, 130, 246), and a print job might need it broken down into CMYK percentages. The Color Converter exists to close that gap instantly — pick or paste a color once and read off its HEX, RGB, HSL, and CMYK values without doing the math yourself or hunting through separate calculators for each format.

The tool centers on a visual color picker paired with a live preview swatch, so you can see exactly what you're working with as you adjust it rather than guessing from numbers alone. Enter or select a color and it updates all four representations at once — HEX for web and code use, RGB for screen-based color models, HSL for when you want to reason about hue, saturation, and lightness independently, and CMYK for print-oriented workflows. Each converted value sits next to a copy button, so once you land on the right shade you can grab the exact string you need and paste it straight into your CSS, design software, or print spec.

One practical habit worth building: when you're translating a brand color from a design file into code, convert it once here and keep both the HEX and RGB values on hand — some CSS properties and canvas/JS APIs expect one format over the other, and having both ready saves a round trip back to the converter later. Because the conversion math runs entirely in your browser, there's nothing to upload and no account needed — you can drop in colors from a client's brand guide without that data ever leaving your machine.

How to convert a color between HEX, RGB, HSL, and CMYK

Pick or enter a color and instantly read its equivalent values across all four formats.

  1. 1

    Open the color picker

    Click the color swatch or picker control to open the visual color selector.

  2. 2

    Choose your color

    Drag within the picker to select a shade, or type a known value directly into the HEX, RGB, HSL, or CMYK input field.

  3. 3

    Check the live preview

    Watch the preview swatch update in real time so you can confirm the color looks right before using it.

  4. 4

    Compare the converted values

    Review the HEX, RGB, HSL, and CMYK fields, which all update together to reflect the same color in each format.

  5. 5

    Copy the code you need

    Click the copy button next to the format you want and paste it into your CSS, design tool, or print document.

Frequently Asked Questions

What color formats can I convert between?

Our color converter supports HEX (#RRGGBB and #RGB shorthand), RGB, RGBA, HSL, HSLA, HSV/HSB, and CMYK. Enter a value in any format and all other formats update instantly.

What is the difference between HSL and HSV/HSB?

Both use Hue and Saturation, but differ in the third component. HSL (Lightness) models colors where 100% lightness is always white and 0% is always black. HSV/HSB (Value/Brightness) models how a color appears on a black background — 100% value is the full color, not white.

What is CMYK and when is it used?

CMYK (Cyan, Magenta, Yellow, Key/Black) is a subtractive color model used in color printing. While RGB is for screens (additive light), CMYK represents how ink layers combine on paper. Graphic designers use CMYK values when preparing documents for print.