Hex to RGB Converter
Convert hex color codes to RGB, HSL, and CMYK with live color preview and reverse RGB to hex conversion.
Hex to RGB / HSL / CMYK
HEX
#ff5733RGB
rgb(255, 87, 51)HSL
hsl(11, 100%, 60%)CMYK
cmyk(0%, 66%, 80%, 0%)RGB to Hex
Hex
#ff5733Frequently Asked Questions about the Hex to RGB Converter
What is a hex color code?
A hex color uses 6 hexadecimal digits (#RRGGBB) to encode red, green, and blue channels from 00 to ff (0-255). Example: #ff5733 = R 255, G 87, B 51.
What does the 3-digit shorthand mean?
Short hex codes (#f53) expand each digit by duplication: #f53 becomes #ff5533. This only works when each channel uses identical digit pairs.
When should I use hex vs rgb()?
Hex is shorter and the standard in CSS, design tools, and HTML. Use rgb() or rgba() when you need an alpha channel or want to set channels via CSS variables and calc().
Does this support an alpha channel?
Not yet. Standard 8-digit hex with alpha (#RRGGBBAA) and rgba() output are common extensions, but this converter focuses on opaque 3- and 6-digit colors.
How is HSL calculated from hex?
The hex is parsed to RGB (0-255), normalized to 0-1, then converted using the standard HSL algorithm based on min and max channel values for lightness, chroma, and hue angle.