Color Picker

Pick colors and get HEX, RGB, HSL values with palette generator

By

Developer tools

Click the palette icon to open system color picker.

HEX
#0ea5e9
RGB
rgb(14, 165, 233)
HSL
hsl(199 89% 48%)

Runs in your browser. No signup required.

About the Color Picker

Pick a color and get its code in three common formats at once: HEX, RGB, and HSL. Use it to match a color from a design, to find the RGB values behind a hex code, or to copy a value straight into a stylesheet.

Everything updates as you choose or type, and each format has its own copy button. Nothing is uploaded.

How to use the Color Picker

Pick or type a color, then copy the format you need.

  1. 1

    Click the palette icon next to the Color Picker label to open your device's color chooser, and pick a color.

  2. 2

    Or type a code into the HEX box, such as #0ea5e9 or the short form #fff.

  3. 3

    Check the large swatch and the three cards underneath: HEX, RGB, and HSL.

  4. 4

    Press Copy HEX, Copy RGB, or Copy HSL to copy that value.

Worked examples

The starting color

Input: #0ea5e9

Result: rgb(14, 165, 233) and hsl(199 89% 48%)

A short code

Input: #fff

Result: rgb(255, 255, 255) and hsl(0 0% 100%)

A mid grey

Input: #808080

Result: rgb(128, 128, 128) and hsl(0 0% 50%)

An orange

Input: #ff8000

Result: rgb(255, 128, 0) and hsl(30 100% 50%)

ff is 255, 80 is 128, and 00 is 0, which is how the three pairs turn into RGB numbers.

Pure red

Input: #ff0000

Result: rgb(255, 0, 0) and hsl(0 100% 50%)

How it works

A HEX code packs red, green, and blue into three pairs of digits, each from 00 to FF, which is 0 to 255. In #0ea5e9 the pairs are 0e, a5, and e9, giving red 14, green 165, and blue 233. A three-digit code doubles each digit, so #fff means #ffffff.

HSL describes the same color by hue, saturation, and lightness. Hue is an angle on the color wheel from 0 to 360, saturation runs from grey to vivid, and lightness runs from black to white. The tool works these out from the RGB values and rounds them to whole numbers.

Limits and tips

  • There is no transparency. Codes with eight digits are not supported.
  • HSL is rounded to whole numbers, so converting it back by hand may land one step away from the original.
  • Text that is not a valid code produces black values of 0, 0, 0 instead of an error. A partly typed code such as #0ea5 gives odd values until you reach three or six digits.
  • Include the # at the start. Without it the RGB and HSL cards still update, but the swatch may not show the color.
  • Copy HEX copies the code exactly as written in the box.
  • There is no screen eyedropper, color name search, palette, or contrast checker.

FAQ

What is the difference between HEX, RGB, and HSL?

They are three ways to write one color. HEX and RGB both mix red, green, and blue, while HSL uses hue, saturation, and lightness, which makes it easier to reason about lighter and darker shades.

Can I type an RGB or HSL value instead of HEX?

No. You can use the picker or a HEX code. The RGB and HSL cards show results for you to copy.

Why do the RGB and HSL cards show 0, 0, 0?

The HEX box holds text that is not a valid color code, so the cards fall back to black. Fix the code and they update.

Why does HSL use spaces instead of commas?

It is written in the modern style, such as hsl(199 89% 48%). RGB keeps its commas.

Can I use these values in a stylesheet?

Yes. Paste the HEX, RGB, or HSL value anywhere a color is accepted, such as a stylesheet, a design tool, or a slide deck.

Why does the color chooser look different on my phone?

The palette icon opens whatever chooser your browser or device provides, so its look varies. Typing a code in the HEX box works the same everywhere.

Are my colors saved or uploaded?

No. The tool works on this page and keeps nothing.