Color Converter
Convert colors between HEX, RGB, HSL, HSV and CMYK. Pick a color or enter a value.
#6366F1rgb(99, 102, 241)rgba(99, 102, 241, 1)hsl(239, 84%, 67%)hsla(239, 84%, 67%, 1)hsv(239, 59%, 95%)cmyk(59%, 58%, 0%, 5%)Color Format Reference
HEX
6-digit hexadecimal (#RRGGBB). Most common in web development and CSS.
RGB
Red, Green, Blue — each 0-255. Used in CSS, image editing, and design tools.
HSL
Hue, Saturation, Lightness. Intuitive for humans; used in CSS color manipulation.
CMYK
Cyan, Magenta, Yellow, Key (Black). Used in professional print design.
How to convert a color
- Paste a color in HEX, rgb() or hsl() format, or click the swatch to pick one visually.
- The preview and every other format update immediately: HEX, RGB, RGBA, HSL, HSLA, HSV and CMYK.
- Click Copy next to the format you need.
Choosing a format for the job
| Format | Where you'll use it |
|---|---|
| HEX | CSS, design handoff, brand guidelines |
| RGB / RGBA | CSS with transparency, canvas and image APIs, most programming libraries |
| HSL / HSLA | CSS when you want to tweak a color by hand, or build lighter and darker variants |
| HSV / HSB | Color pickers in Photoshop, Figma, Sketch and many UI libraries |
| CMYK | A starting point for print briefs (see the note in the FAQ) |
Why HSL is great for building palettes
In HEX, there's no obvious relationship between #6366f1and a lighter version of the same indigo. In HSL it's just the last number: hsl(239 84% 67%) becomes hsl(239 84% 85%) for a light tint or hsl(239 84% 45%)for a darker shade. Keep the hue fixed, vary lightness for tints and shades, and lower the saturation for muted variants. That's how most design-system color scales start, before the steps are tuned by eye.
One limitation worth knowing: HSL lightness doesn't match perceived brightness. A yellow and a blue at the same HSL lightness look very different in brightness. Newer CSS color spaces such as oklch() fix this and are well supported in current browsers, which makes them a good choice for generating accessible palettes.
Contrast and accessibility
If the color is for text or UI, check its contrast against the background it will sit on. WCAG 2 asks for a ratio of at least 4.5:1 for normal text and 3:1 for large text and interface elements like input borders and icons. Light grays on white are the most common failure. A gray like #9ca3af on white looks elegant in a mockup but only reaches about 2.5:1.
Frequently asked questions
Which color formats can I type in?+
HEX (#6366f1 or the short #fff form), CSS rgb() and rgba(), and hsl() and hsla(), in either the classic comma syntax or the modern space syntax like rgb(99 102 241 / 50%). You can also pick a color visually with the swatch. Alpha values are accepted but ignored in the conversion.
Why doesn't my printed color match the screen?+
Screens mix light (RGB) and printers mix ink (CMYK), and many bright screen colors, especially vivid blues, greens and oranges, simply can't be reproduced in ink. The CMYK values here are a mathematical conversion, not a colour-managed one; for professional print, ask your printer for their ICC profile and convert in a design tool.
What's the difference between HSL and HSV?+
Both describe a color by hue and saturation, but the third value differs. In HSL, lightness 100% is always white. In HSV (also called HSB), value 100% is the brightest version of the hue. Design tools like Photoshop and Figma's color picker use HSV/HSB; CSS uses HSL.
Should I use HEX or RGB in CSS?+
They're equivalent and every browser supports both. HEX is shorter and easy to copy from design tools; rgb() and hsl() are easier to read and adjust, and make it obvious when you want transparency. Pick one and be consistent.
Last updated October 16, 2026