Color Converter

Convert a colour between RGB, HEX and HSL codes: enter red, green and blue values to get all three formats.

How the Codes Relate:

- RGB lists red, green and blue light from 0 to 255 each

- HEX is the same three numbers written in base 16, two digits per channel, after a #

- HSL describes the same colour as Hue (0-360 degrees on the colour wheel), Saturation %, and Lightness %

Example:

Red = 41, Green = 128, Blue = 185

HEX = #2980B9

RGB = rgb(41, 128, 185)

HSL = hsl(204, 64%, 44%)

HEX by hand: 41 = 29 in base 16, 128 = 80, 185 = B9, joined as 29-80-B9.

Frequently Asked Questions

Which format should I use in CSS?

Any of them: browsers accept hex, rgb() and hsl() everywhere. HEX is compact and what design tools copy by default; HSL is the most human-friendly for building palettes, because you can hold hue steady and step lightness to make matching shades and tints.

Why do printed colours look different from my screen?

Screens mix light (RGB, additive: all channels at full is white), while print mixes ink (CMYK, subtractive). Some vivid screen colours sit outside the printable range entirely, so they print duller. This converter covers screen formats; print conversion needs colour profiles, not just maths.