SmartTechnology solutions for business

HEX, RGB and HSL Colour Converter

Type a colour in any format or pick one, then copy it as HEX, RGB or HSL.

Your result

How to use it

  1. Type the colour code or pick it from the colour box.
  2. Check the preview and the three formats.
  3. Press “Copy” beside the format you want.

Examples

  • HEX to RGB#00aaff rgb(0, 170, 255)
  • RGB to HEXrgb(255, 128, 0) #ff8000
  • HEX to HSL#336699 hsl(210, 50%, 40%)
Tool details and privacy

Type a colour code as HEX, RGB or HSL, or pick a colour from the colour box. All three formats appear with a preview, and you copy the one you need with one press.

Options

  • Accepts #RGB and #RRGGBB, with or without the hash.
  • Accepts rgb() and hsl(), and three plain numbers such as 255, 128, 0.
  • A colour box lets you pick by eye.

Limits

  • HSL values are rounded to whole numbers, so a colour can shift by one step when converted there and back.
  • Transparency (rgba or #RRGGBBAA) and colour names such as red are not supported.
  • It does not convert to CMYK or other print colours.

Privacy

The colour is converted in your browser and is not sent to any server.

Questions

How do I convert HEX to RGB?

Split the code into three pairs and convert each pair from hexadecimal to decimal. #00aaff means red 0, green 170 and blue 255.

What is the difference between RGB and HSL?

RGB describes a colour by its red, green and blue. HSL describes it by hue, saturation and lightness, which is easier when you want a lighter or darker shade.

Are #0af and #00aaff the same colour?

Yes. The short form repeats each digit.

Related tools

All tools