Convert between HEX, RGB, and HSL instantly
| Name | HEX | Swatch |
|---|
Read more: Color Converter -- HEX to RGB to HSL Explained
Web developers encounter three main color formats daily. HEX is the most compact -- a pound sign followed by six hexadecimal digits (e.g. #ff5733). Each pair of digits represents red, green, and blue intensity from 00 to ff. It is the most widely used format in CSS because it is short and easy to paste.
RGB uses the same red-green-blue model but with decimal numbers from 0 to 255. The function syntax rgb(255, 87, 51) is more readable when you need to adjust a single channel programmatically.
HSL stands for Hue, Saturation, Lightness. Hue is a degree on the color wheel (0--360), saturation and lightness are percentages. HSL is often the most intuitive for designers because you can make a color lighter or more muted without affecting its core hue.
rgba() for transparency.CSS supports 148 named colors. The table above lists the 50 most commonly used named colors with their HEX equivalents. You can use named colors directly in your stylesheets (e.g. color: coral;) for readability, though HEX or HSL values give you more precise control.
Modern CSS also supports hsl(), hwb(), lab(), lch(), and oklch() for wider gamut and perceptual uniformity. For most web projects, HEX, RGB, and HSL cover the vast majority of use cases.
HEX encodes red, green, and blue in a compact hexadecimal string. RGB uses decimal integers for the same three channels. HSL describes color with hue, saturation, and lightness, which is more intuitive for adjusting brightness or vividness without shifting the underlying color.
Take the six-digit hex string and split it into three pairs. Convert each pair from base 16 to base 10. For example, #ff5733 becomes R=255 (ff), G=87 (57), B=51 (33). This converter does it instantly as you type.
Yes. The hsl() function is supported in all modern browsers. It is especially useful when building design tokens or theme systems because you can adjust lightness or saturation with a single number change.
Yes. All conversion happens in your browser using JavaScript. No color data is sent to any server. The tool is completely free with no usage limits.