Color Palette Picker (Manual & Auto) from Image

Design Client-side color palette picker eyedropper image hex rgb hsl extractor design

This tool runs entirely client-side, in your browser: your data is never sent anywhere.

What it does

This tool lets you pull colors out of any image in two ways:

Everything happens locally in your browser using the <canvas> API. Your image is never uploaded anywhere.

Try it

How it works

Manual picking

  1. When you load an image, it's drawn onto an off-screen <canvas> at its natural resolution.
  2. On click, the tool reads the pixel under your cursor with CanvasRenderingContext2D.getImageData(x, y, 1, 1), which returns the exact [R, G, B, A] values at that coordinate.
  3. Those values are converted to HEX and HSL and displayed instantly.

Automatic palette extraction

The extractor uses a simplified median cut color quantization algorithm, the same family of technique used by tools like Photoshop's "Indexed Color" conversion:

  1. Every pixel of the (down-sampled, for performance) image is collected into one big bucket of [R, G, B] points.
  2. The bucket with the greatest color range (along whichever channel โ€” R, G, or B โ€” varies the most) is found and split in two at its median, repeatedly, until there are as many buckets as the requested palette size.
  3. Each final bucket is averaged into a single representative color โ€” that's one palette swatch.

This tends to produce visually meaningful dominant colors rather than just "the N most frequent exact pixel values," which would be skewed by noise and compression artifacts.

Notes