Color Converter

Convert between HEX, RGB, and HSL instantly

HEX #ff5733
RGB rgb(255, 87, 51)
HSL hsl(11, 100%, 60%)

Top 50 CSS Named Colors

NameHEXSwatch

HEX vs RGB vs HSL

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.

When to Use Each Format

CSS Color Reference

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.

Frequently Asked Questions

What is the difference between HEX, RGB, and HSL?

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.

How do I convert a HEX color to RGB?

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.

Can I use HSL colors in CSS?

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.

Is this tool free and private?

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.