Color Converter: HEX, RGB and HSL

Get the exact color code you need for CSS, Figma, Canva, PowerPoint or Photoshop. Pick a color or paste a code in any format, then copy the HEX, RGB or HSL value ready to use.

๐Ÿ”’ Runs 100% in your browser. Nothing is uploaded.

Designers, developers and anyone editing a website or a presentation constantly need the same color in a different format: HEX for CSS, RGB for design tools, HSL for adjusting lightness. Type or pick a color in any format and the other two update immediately.

Popular uses

Also known as: HEX to RGB ยท RGB to HEX ยท HSL to HEX ยท Color code converter ยท Online color picker ยท CSS color converter

How to use

  1. Pick a color with the color picker, or type a value in HEX, RGB or HSL.
  2. The other formats and the preview update instantly.
  3. Click Copy next to the format you need.

Why this tool is safe

This page loads no tracking scripts, and its security policy forbids it from sending data to other servers. The work happens in your browser's memory and is gone when you close the tab.

Frequently asked questions

What is the difference between HEX, RGB and HSL?

They describe the same colors in different ways. HEX (#0f766e) and RGB (15, 118, 110) give the amounts of red, green and blue. HSL gives the hue (0โ€“360ยฐ), saturation and lightness, which makes it easy to create lighter or darker shades.

Which formats can I type?

HEX with or without # in 3 or 6 digits (#0f7, 0f766e), RGB as three numbers from 0 to 255 (with or without rgb()), and HSL as hue, saturation % and lightness % (with or without hsl()).

Why does a color look slightly different after converting to HSL and back?

HSL values are rounded to whole numbers, so a round trip can shift a channel by 1. The difference is not visible to the eye.

How do I convert HEX to RGB?

Split the sixโ€‘digit HEX code into three pairs and convert each pair from base 16 to a number from 0 to 255. For example, #1E90FF is 1E = 30, 90 = 144 and FF = 255, which is rgb(30, 144, 255). The converter does this for you as you type.