Skip to tool

Image Color Picker

Try:

How to get a color from an image

Upload, paste, or drop an image (PNG, JPG, WebP, or GIF up to 10 MB), or load one by URL. In Eyedropper mode, hover to read the pixel under the cursor through an 8× magnifier and click to add it to the saved palette; each color can be copied as HEX, RGB, HSL, or OKLCH. Palette mode extracts 5, 8, 12, 16, or 24 dominant colors from the whole image, and Region mode does the same inside a rectangle you drag, which helps when a logo or subject fills only part of the picture. In Chrome or Edge 95+, the native EyeDropper button can also pick a color from anywhere on the screen. The last 5 images are kept as small thumbnails in this browser's local storage so you can restore them; Clear history removes them.

Palette algorithms: K-means, median cut, frequency

Each palette is computed from up to 10,000 pixels sampled evenly across the image or region. Frequency groups pixels into a 32 × 32 × 32 color cube (5 bits per channel) and returns the most common cells; it is fastest but favors large flat backgrounds. Median cut repeatedly splits the pixel set along its widest RGB channel, which works well for posters and illustrations. K-means (the default) clusters in CIE L*a*b*, where straight-line distance roughly matches perceived color difference, using K-means++ seeding and up to 20 iterations; it suits photos best. The palette can be sorted by frequency, hue, or lightness.

Export the palette to CSS, Tailwind, SCSS, JSON, or GIMP

Saved colors can be reordered by dragging and exported as CSS custom properties (--color-1, --color-2 …), a Tailwind v4 @theme block (--color-palette-1 … in OKLCH), SCSS variables, JSON, a GIMP .gpl palette file, or a PNG swatch image. Copy any format to the clipboard or download it as a file.

Contrast check and color blindness preview

Shift-click two saved colors to see their WCAG 2.1 contrast ratio with pass or fail for AA (4.5:1 normal text, 3:1 large text) and AAA (7:1 and 4.5:1). The color blindness toggle filters the image and palette with a fixed 3×3 RGB matrix for protanopia, deuteranopia, or tritanopia. It is a quick approximation; for a model-based check with severity control, use the Color Blindness Simulator.

Frequently asked questions

How do I find the HEX code of a color in an image?

Load the image, keep Eyedropper mode on, and hover over the spot you want. The cursor panel shows the pixel's HEX value along with RGB, HSL, and OKLCH, each with a copy button. Click the image to add that color to the saved palette.

How do I extract a color palette from an image?

Switch to Palette mode, choose the number of colors (5 to 24) and an algorithm. K-means is the default and gives the most accurate result on photos, median cut is balanced for illustrations, and frequency is the fastest. Click Add all to saved to keep the palette, then export it.

Why does the K-means palette change every time?

K-means++ starts from randomly chosen pixels, so each run can settle on slightly different clusters. The colors stay close, but individual HEX values can shift by a few units per channel. Use median cut or frequency if you need the same result every time.

Can I pick a color from outside the image?

Yes, in Chromium browsers (Chrome 95+, Edge 95+) that support the EyeDropper API: click the native EyeDropper button and pick any pixel on your screen. Firefox and Safari do not support this API, so the button is disabled there and you can only pick from the loaded image.

Are transparent pixels included in the palette?

No. Pixels with less than 50% opacity (alpha below 128) are skipped, so a logo on a transparent background gives a palette of the logo colors only. A fully transparent image shows an error.

Why does loading an image by URL fail?

The browser fetches the image directly from that site and can read its pixels only if the site allows cross-origin access. If it does not, download the image first and then drop it in.