Skip to content
Hex Color Picker

Hex Color Picker

Drag on the color field, set the hue with the slider, and the hex code updates as you move. Every pick also shows its RGB, HSL and CMYK values and the closest CSS color name, and each value copies with one click. Nothing is uploaded; the picker runs entirely in your browser.

#1E90FFexactly dodgerblue

This is the CSS color dodgerblue #1E90FF

Use 3 or 6 digits, for example #1E90FF or 19F

For example rgb(30, 144, 255) or 30 144 255

For example hsl(210, 100%, 56%)

For example cmyk(88%, 44%, 0%, 0%)

Recent colors

Colors you pick appear here. They stay on this device.

By the Hex Color Picker Team. Updated

How to use the hex color picker

  • Drag the handle on the large color field to set saturation and brightness, then move the hue slider to change the base color.
  • Or skip the dragging: type or paste a hex code such as #1E90FF, 1E90FF or the shorthand #19F into the hex box.
  • Copy any value with its button. The hex, RGB, HSL and CMYK rows are all editable, so you can start from whichever format you already have.
  • Your last twelve colors appear under the picker so you can jump back to an earlier pick.

What a hex color code is

A hex code is three numbers packed into one string. After the # come six hexadecimal digits: two for red, two for green, two for blue. Each pair runs from 00 to FF, which is 0 to 255 in everyday numbers, so #FF0000 is full red with no green or blue, and #000000 is black.

When both digits in every pair match, you can shorten the code to three digits. #FF8800 becomes #F80, and #FFFFFF becomes #FFF. Six digits give 16,777,216 possible colors, which is the same palette your screen uses for standard sRGB color.

Pick a color from anywhere on your screen

In Chrome, Edge and other Chromium-based desktop browsers, an Eyedropper button appears next to the picker. It lets you click any pixel on your screen, in this window or another application, and loads that color here. Firefox and Safari don't support the browser's EyeDropper feature yet, so there the button is replaced with a link to the color picker from image tool, which samples a screenshot or photo you upload.

Hex, RGB, HSL and CMYK compared

  • Hex: compact and the default in CSS, design tools and brand guidelines, for example #1E90FF.
  • RGB: the same color as three 0-255 numbers, for example rgb(30, 144, 255). Useful when you need to calculate with the channels.
  • HSL: hue in degrees, saturation and lightness in percent. The easiest format to tweak by hand, because lightness moves a color lighter or darker without changing its hue.
  • CMYK: cyan, magenta, yellow and black percentages for print. The values here use the standard mathematical conversion from RGB, so treat them as a starting point rather than a press-ready proof.

Privacy

Colors you pick, and the history list under the picker, stay in your browser. Recent colors are saved with your browser's local storage on your own device and are never sent to a server. Clearing your browser data, or using the Clear button, removes them.

Common questions

What is the hex code for white and for black?

White is #FFFFFF and black is #000000. Both can be written in shorthand as #FFF and #000.

Can I type a color name instead of a code?

Yes. The hex box accepts any standard CSS color name such as dodgerblue or crimson, and converts it to its hex code.

Does the picker save or upload my colors?

No. Everything runs in your browser. Recent colors are kept in local storage on your device only.

More color tools