Hex to RGB Color Converter
Enter a hex color code to get RGB, HSL, and CMYK values — or go the other way.
Color Format Reference
| Format | Example | Used In |
|---|---|---|
| Hex | #FF8C00 | HTML, CSS |
| RGB | rgb(255,140,0) | CSS, Canvas |
| HSL | hsl(33,100%,50%) | CSS, design tools |
| CMYK | 0%, 45%, 100%, 0% | Print / offset |
HEX, RGB and HSL
The same color can be written three common ways. A HEX code like #2563EB packs red, green, and blue into pairs of hexadecimal digits. RGB writes those same channels as decimals from 0–255, so #2563EB is rgb(37, 99, 235). HSL describes the color by hue, saturation, and lightness, which is more intuitive for tweaking shades. This converter shows all three at once.
Reading a HEX Code
Each pair is one channel: the first two digits are red, the middle two green, the last two blue, each from 00 (none) to FF (255, full). Shorthand like #FFF expands to #FFFFFF. Add two more digits for an alpha (transparency) channel: #2563EB80 is 50% opaque.
Where You'll Use It
Designers copy HEX from mockups, but CSS animations and canvas often need RGB, and HSL makes it easy to generate lighter or darker variants of a brand color. For accessibility, run pairs through the contrast checker; to explore palettes, the color picker.