Convert HEX color codes to RGB, HSL, HSV, and CMYK. Supports 3-digit shorthand hex and shows all color formats at once — copy any value instantly.
#6C63FF
rgb(108, 99, 255)
hsl(243, 100%, 69%)
hsv(243, 61%, 100%)
cmyk(58%, 61%, 0%, 0%)
Red
108
Green
99
Blue
255
Hue
243°
In digital graphic design and web development, colours are specified across multiple color models. While HEX notation represents red, green, and blue values in compact base-16 strings, RGB and HSL representations enable dynamic opacity blending (alpha channel) and algorithmic color adjustment.
A six-character HEX code decomposes into three 2-digit hexadecimal bytes:
$$\text{HEX } #R_1R_2G_1G_2B_1B_2 \implies (R, G, B) = (16 \cdot R_1 + R_2,; 16 \cdot G_1 + G_2,; 16 \cdot B_1 + B_2)$$
| Color Name | HEX Code | RGB Notation | HSL Notation |
|---|---|---|---|
| Pure White | #FFFFFF | rgb(255, 255, 255) | hsl(0, 0%, 100%) |
| Pure Black | #000000 | rgb(0, 0, 0) | hsl(0, 0%, 0%) |
| Electric Indigo | #6366F1 | rgb(99, 102, 241) | hsl(239, 84%, 67%) |
| Crimson Red | #EF4444 | rgb(239, 68, 68) | hsl(0, 84%, 60%) |
JavaScript
function hexToRgb(hex) {
let cleaned = hex.replace(/^#/, '');
if (cleaned.length === 3) {
cleaned = cleaned.split('').map(c => c + c).join('');
}
const num = parseInt(cleaned, 16);
return {
r: (num >> 16) & 255,
g: (num >> 8) & 255,
b: num & 255,
rgbString: `rgb(${(num >> 16) & 255}, ${(num >> 8) & 255}, ${num & 255})`
};
}
rgb(255 102 0 / 0.8).This website and utility are provided for general informational, calculation, and educational purposes only. Always verify critical computation outputs prior to professional deployment or financial use. See our Terms of Service and Privacy Policy for full governance details.