Hex to RGB Converter

Turn a hex colour into RGB and HSL values instantly — and see the colour live on screen. Enter a hex code like #7C5CFF or 7C5CFF, or go the other way and convert RGB values back to hex.

Colour values

—
Hex
—
RGB
—
HSL

RGB to hex

Hex result

—

How to use

  1. Type a hex colour code such as #7C5CFF, 7C5CFF or the shorthand FC5.
  2. Click Convert to RGB to see the RGB and HSL values and the live colour swatch.
  3. To go the other way, enter red, green and blue values (0–255) and click Convert to hex.

Frequently asked questions

What is a hex colour code?

A hex code writes the red, green and blue parts of a colour as two hexadecimal digits each, after a #. #FF0000 is pure red, #00FF00 is pure green and #0000FF is pure blue.

What is the difference between RGB and HSL?

RGB describes a colour by how much red, green and blue light it contains. HSL describes the same colour by hue (the angle on the colour wheel), saturation and lightness — which many designers find easier to adjust.

What is 3-digit shorthand hex?

When each pair of hex digits repeats, you can write one digit per channel: #FC5 is the same as #FFCC55. This tool accepts both forms.

Do the conversions run on a server?

No. All conversions happen in your browser with JavaScript, so your colours never leave your device.

Related tools