Skip to content

Color Picker

An online rgb color picker that syncs HEX, RGB and HSL live, with eyedropper, image sampling and random colors.

Last updated

Preview

rgba(255, 0, 0, 1)

Load a photo, then click any pixel to sample its color. The image never leaves your device.

How to use color picker

  1. Pick a color with the swatch picker, or type into the HEX, RGB or HSL field — every field stays in sync as you type.
  2. Read the large swatch preview and the rgba() line underneath it.
  3. Click Pick from screen to grab a color from anywhere on your display (Chrome or Edge only).
  4. Click Pick from image, load a photo, then click any pixel to sample it — the image never leaves your device.
  5. Click Random color for a new cryptographically random color, or any of the Copy buttons to copy a format.

Examples

Brand red #DC143C (crimson)

Typing the HEX code shows rgb(220, 20, 60) and hsl(348, 83.3%, 47.1%) — verified conversions you can paste straight into CSS.

Classic orange in RGB

Entering 255, 165, 0 in the RGB field converts to the hex code #FFA500.

Roll a random color

The Random color button draws three bytes from the Web Crypto API, so every color is as unpredictable as your browser can make it.

What is Color Picker?

Every color on a screen is a mixture of red, green and blue light, and a color picker is a window into that mixture. Designers usually talk in HEX — a compact six-digit code like #FF0000 for pure red — while CSS authors increasingly reach for HSL, which describes a color by hue (the position on the color wheel), saturation (how vivid it is) and lightness (how close to white or black it sits). RGB names the very same colors by their three channel values, 0 to 255 each.

The three notations are interchangeable views of one value, and converting between them by hand is fiddly: HEX to RGB is hexadecimal arithmetic, and RGB to HSL involves minima, maxima and chroma. A good online color picker does that bookkeeping instantly and shows all formats at once, so you can copy whichever one your tool expects — a design app that wants HEX, a stylesheet that wants hsl(), or an older library that still asks for rgb().

This color picker keeps every view in sync as you edit any of them, previews the color on a large swatch with its rgba() readout, and adds three ways to capture color from the world: the eyedropper (in Chrome and Edge), sampling any pixel from a photo you load, and a random color button driven by your browser’s cryptographic randomness rather than a weak pseudo-random generator. It is a fully local color picker tool — nothing you load or pick is ever uploaded.

Frequently asked questions

What is the difference between HEX, RGB and HSL?

All three describe the same colors. HEX packs the red, green and blue channels into a six-digit hexadecimal code (#FF0000). RGB states the three channels as decimal numbers from 0 to 255 (rgb(255, 0, 0)). HSL describes the same red as a hue angle with a percentage saturation and lightness (hsl(0, 100%, 50%)) — the format most people find easiest to adjust by hand, because nudging lightness or saturation keeps the hue stable.

How does the eyedropper (Pick from screen) work?

The button uses the EyeDropper API built into Chrome and Edge. Clicking it opens a magnifying loupe; move it over any pixel on your screen and click to capture that color. The browser asks for permission before reading the screen, and pressing Esc cancels. On Firefox and Safari the button is disabled with a note, because those browsers do not implement the API yet.

Can I pick a color from a photo?

Yes — use Pick from image. The photo is drawn onto a local canvas in your browser, and clicking any pixel reads that one pixel’s red, green and blue values. The file is never uploaded or sent anywhere, so client photos and confidential screenshots are safe to sample.

What is rgba — what is the alpha channel?

The alpha channel is a color’s opacity, written as a fourth value between 0 (fully transparent) and 1 (fully opaque). rgba(255, 0, 0, 0.5) is pure red at half strength. This picker shows every color with alpha 1 in its rgba() readout; to make a color translucent in CSS, copy the rgba() line and lower the last number.

Do you support HSV or HSB?

The picker works in HSL. HSV (also called HSB) is a closely related model that swaps HSL’s lightness for "value" or "brightness" — the two agree on hue and saturation but diverge on how pale or bright a color can go. Most design tools and all modern browsers accept HSL directly, so you rarely need to convert; enter your HSV hue and saturation here and adjust lightness until it matches.

Browse all converters.