๐จ
Color Format Converter
Color
Convert a parsed color into HEX, RGB, HSL, HSV and a simple CMYK representation.
0
0
Color
Paste HEX, RGB, RGBA, HSL, HSLA, HSV, or CMYK. Pick a color or adjust alpha. All formats update live.
#3498DB
HEX
#3498DB
HEX8
#3498DBFF
RGB
rgb(52, 152, 219)
RGBA
rgba(52, 152, 219, 1)
HSL
hsl(204, 70%, 53%)
HSLA
hsla(204, 70%, 53%, 1)
HSV
hsv(204, 76%, 86%)
CMYK
cmyk(76%, 31%, 0%, 14%)
RGB to hex converter that turns an RGB value into a HEX code, and HEX back into RGB, on the same page. It also shows HSL, HSV and CMYK, and accepts HEX, RGB, HSL, HSV or CMYK input.
See moreSee less about the Color Format Converter
Commas are needed inside rgb(), and named colors such as red are not parsed.
Examples
RGB to HEX
rgb(255, 136, 0) โ #FF8800 ยท hsl(32, 100%, 50%)Values are comma separated, as in rgb(255,136,0). CSS space syntax such as rgb(255 136 0) is not parsed.
HEX to RGB
#2E8B57 โ rgb(46, 139, 87)HEX takes 3, 6 or 8 digits, with or without #. HEX8 output adds FF for full opacity, shown as #2E8B57FF.
Key features
- HEX, RGB, HSL, HSV and CMYK
- Two-way conversion on one page
- Alpha output
- Copy each format
Related Blog Posts
Quick answers for Color Format Converter
Does it convert RGB to HEX and HEX to RGB?
Yes, both directions are on one page. Type a color in any supported format and the other formats update, including HEX, RGB, HSL, HSV and CMYK.
Which input formats are accepted?
HEX with 3, 6 or 8 digits, with or without #, plus rgb() and rgba(), hsl() and hsla(), hsv() and cmyk(), using comma-separated numbers. Named colors such as red are not parsed.
Are out-of-range RGB values clamped?
Yes. RGB numbers outside 0 to 255 are clamped silently to that range.
Is the CMYK value exact?
No. CMYK is a simple formula conversion from RGB, so print profiles and real ink colors can look different.