HEX to RGB Converter
Convert between HEX, RGB, HSL, and CMYK in any direction. Type into any field.
.element {
color: #7C3AED;
color: rgb(124, 58, 237);
background-color: #7C3AED;
}
Best for: Converting a hex from a brand guide into the RGB a design tool needs, and translating between hex, RGB, HSL and CMYK in one step
Limitations: Converts colour values and does not check contrast or accessibility, so legibility still needs testing separately
Best suited for: Developers translating brand documentation into the format their tooling expects
How to Use the Color Converter
Type into any input field -- HEX, RGB, HSL, or CMYK -- and all other formats update instantly. You can work in any direction. Paste a HEX code, type RGB values, or enter HSL numbers and the converter handles everything automatically.
HEX is the standard format for web design CSS. RGB is useful when you need to add transparency using rgba(). HSL is the most intuitive for design systems -- adjusting lightness alone lets you create tints and shades while keeping the same hue. CMYK is required for print design work.
A shorthand 3-digit HEX like #7CE (equivalent to #77CCEE) is also accepted. The converter expands it automatically. Both uppercase and lowercase HEX codes are recognized.
For RGB input, enter three numbers separated by commas: 124, 58, 237. Values must be between 0 and 255. For HSL, enter hue (0-360), saturation (0-100), and lightness (0-100). The % symbols are optional. For CMYK, enter four numbers from 0 to 100.
Advertisement
Frequently Asked Questions
When You Need the RGB Value
Hex is compact and dominates stylesheets, but RGB is what you need whenever a value must be manipulated rather than just declared. Anything that adjusts opacity, animates between two colours, or feeds a canvas or SVG operation works in numeric channels. Design software, print workflows and most charting libraries also expect separate red, green and blue values.
A typical case: you have a brand hex code and need it as rgba with 40 percent opacity for an overlay. Converting first gives you the three channel numbers to drop into the alpha syntax. Both notations and how they relate are documented in the MDN colour value reference.