Design

HEX to RGB Color Converter

Convert a HEX color to RGB and HSL, or pick a color visually and copy the values for your CSS.

#3B82F6HEX
rgb(59, 130, 246)RGB
hsl(217, 91%, 60%)HSL

How to use it

  1. Type a HEX color (for example #3b82f6) or pick one with the color box.
  2. Read the RGB and HSL values, which update automatically.
  3. Copy the value you need into your CSS or design tool.

How it works and why it matters

Colors on the web can be written as HEX codes (#3b82f6), RGB values (rgb(59, 130, 246)) or HSL values (hsl(217, 91%, 60%)). They describe the same color in different ways. This converter switches between them so designers and developers can use whichever format their tool or stylesheet expects.

More free tools from TLOGZ

Questions

What is the difference between HEX and RGB?

They describe the same colour. HEX is six letters and numbers (pairs for red, green and blue). RGB lists the amounts of red, green and blue from 0 to 255.

Can I use a 3-digit HEX code?

Yes. #fff is the same as #ffffff. The tool expands it automatically.

What is HSL?

HSL describes a colour by hue (the colour wheel position), saturation and lightness. It is often easier for humans to adjust than RGB.

Related tools