Skip to content

Image color picker

Click or paste any image to sample exact pixel colors and extract a ready-to-use color palette.

Drop an image here or press Ctrl+V to paste

Click anywhere on the image to inspect pixels and extract a palette

Your files are open only in this tab. Nothing is uploaded.

How to use Image color picker

  1. Load an image. Drop a file onto the canvas or press Ctrl+V or Cmd+V to paste a clipboard screenshot.
  2. Sample a pixel. Hover and click with the 9x9 loupe, or switch Eyedropper between 1x1, 3x3, and 5x5.
  3. Review dominant swatches. Drag the Swatches slider between 4 and 12 to adjust the extracted palette.
  4. Copy or export. Copy individual HEX or OKLCH values, check WCAG contrast, or export CSS, Tailwind, or JSON.

Your files are processed on this device and never uploaded. They stay private, and there's nothing to delete afterwards.

Sampling pixels with the 9x9 loupe and clipboard paste

Designers and front-end developers rarely want to save temporary screenshots to disk just to grab a brand hex code. Opening an image in your browser via file drop or clipboard paste lets you pick pixel colors from images without uploading proprietary mockups to external servers.

Instant Ctrl+V screenshot inspection and 1,200 px analysis scaling

Pressing Ctrl+V (or Cmd+V on macOS) triggers a window paste listener that reads image/* clipboard items directly into memory. Dropped files accept JPG, PNG, WebP, AVIF, HEIC, GIF, and sanitized SVG graphics.

According to the MDN CanvasRenderingContext2D.drawImage() documentation, the tool draws the decoded bitmap onto an off-screen canvas scaled down only if its longest edge exceeds 1,200 px (MAX_ANALYSIS_SIDE). Once you pick a color, you can match frame colors in a photo border padding tool.

Arrow-key pixel nudging and transparent pixel handling

A 9×9 pixel loupe beside the preview swatch magnifies the region around your cursor, highlighting the exact center cell with a crisp dual border and displaying (x, y) coordinates underneath. Focus the canvas and press Arrow keys to step 1 px at a time, or hold Shift with Arrow keys for 10 px jumps.

If you click an area where alpha is below 0.02, the main swatch switches to a grey-and-white checkerboard and displays rgba(0, 0, 0, 0). Moving onto an opaque pixel or clicking any extracted swatch restores live format and contrast readouts immediately.

Why use 3x3 or 5x5 averaging instead of a 1x1 pixel?

Single-pixel sampling reads the exact RGBA value at one coordinate, which works for flat UI icons but often misleads on compressed photographs. Switching the Eyedropper menu to 3×3 average or 5×5 average computes the mean color across neighboring pixels to neutralize JPG macroblock grain.

Smoothing JPEG compression grain and camera sensor noise

In samplePixelAverage, radius 0 reads 1 pixel (1×1), radius 1 averages 9 pixels (3×3), and radius 2 averages 25 pixels (5×5). Averaging smooths out chrominance subsampling artifacts on painted walls, skin tones, and fabric textures without blurring distant edges.

When 1x1 exact sampling is better for crisp UI sprites

Choose 1×1 exact when inspecting pixel art, hairline 1 px borders, or vector exports where adjacent pixels belong to distinct UI elements. If you are auditing vector icons before sampling, you can strip redundant SVG editor metadata to keep fills clean.

Eyedropper mode Sampling grid Pixels averaged Best input type
1×1 exact Radius 0 1 px UI screenshots, pixel art, 1 px borders
3×3 average Radius 1 9 px Product photos, gradients, compressed JPGs
5×5 average Radius 2 25 px Textured fabrics, skies, noisy camera shots
Dominant palette Perceptual k-means 4 to 12 swatches Full-image brand themes and design tokens

Extracting dominant palettes to CSS, Tailwind, and JSON

Manual eyedropping finds one accent at a time, whereas Dominant palette summarizes an entire composition automatically. Moving the Swatches slider between 4 and 12 (default 8) re-clusters the image in a background Web Worker without freezing the page.

Perceptual k-means clustering across 4 to 12 swatches

The worker skips pixels with alpha below 64, runs 12 iterations of weighted perceptual k-means clustering, and merges centroids closer than 900 squared perceptual distance units. Each resulting swatch card shows its hex code and percentage share of opaque image area, and clicking any swatch selects it for inspection.

Because clustering runs inside a dedicated Web Worker with transferable pixel buffers, dragging the Swatches slider between 4 and 12 updates the palette smoothly without blocking pointer movement on the main canvas.

Exporting :root variables, Tailwind @theme tokens, and JSON

Tip: Click Tailwind under Export palette to copy ready-to-paste @theme tokens (–color-palette-1 through –color-palette-8) straight into a Tailwind v4 stylesheet.

As defined in the W3C CSS Color Module Level 4 Specification, modern stylesheets support space-separated rgb(), hsl(), hwb(), and oklch() notations natively. Switching Export palette to CSS outputs :root custom properties, while JSON exports an array containing hex, rgb, hsl, oklch, and sharePercent. You can also fine-tune individual shades in Color converter.

How perceptual OKLCH and WCAG contrast improve web design

Every sampled pixel or clicked swatch updates six copyable color formats alongside live accessibility scores. Seeing OKLCH lightness and WCAG contrast ratios side by side prevents low-contrast text mistakes before tokens reach production CSS.

Converting sRGB pixels into HEX, HSL, HWB, and OKLCH

Each color updates HEX, RGB, HSL, HWB, OKLCH, and Legacy RGB rows with dedicated copy buttons. OKLCH expresses perceptual lightness (L%), chroma (C), and hue (H), making it easier to judge visual brightness than HSL lightness alone.

Unlike legacy hex strings, OKLCH lets you adjust hue across buttons or badges while keeping perceived brightness steady across an entire design system.

Evaluating White text and Black text against AA and AAA thresholds

Per the W3C WCAG 2.1 Accessibility Guidelines, contrast is computed from linearized sRGB relative luminance ((L1 + 0.05) / (L2 + 0.05)). The two Aa cards score your sampled background against White text (#ffffff) and Black text (#000000), reporting AAA (>= 7:1), AA (>= 4.5:1), AA large text only (>= 3:1), or Fails (< 3:1). Checking these ratios upfront helps you place readable captions over photos with confidence.

Questions

Why should I use 3x3 or 5x5 averaging instead of a single pixel?

Compressed JPG photos and camera shots contain subtle chroma noise from pixel to pixel. Averaging a 3x3 or 5x5 neighborhood smooths out compression grain so you capture the true perceived surface color instead of an outlier pixel.

Can I paste a screenshot from my clipboard without saving a file?

Yes, take a screenshot to your system clipboard and press Ctrl+V on Windows/Linux or Cmd+V on Mac anywhere on the page. The image loads immediately into the canvas and extracts its dominant palette locally.

How are dominant palette swatches extracted from an image?

A background Web Worker samples opaque pixels and runs perceptual k-means clustering across 12 iterations, merging near-duplicate clusters so every swatch stays visually distinct. Each swatch displays its hex code and share percentage.

How does the WCAG contrast checker evaluate sampled colors?

The tool converts your selected sRGB color to relative luminance and calculates contrast ratios against pure white (#ffffff) and pure black (#000000). Ratios of 7:1 or higher pass AAA, 4.5:1 passes AA, and 3:1 passes AA large text only.

What is the advantage of using OKLCH over HEX and RGB?

OKLCH separates perceptual lightness, chroma, and hue so two colors with equal lightness look equally bright to human eyes. HEX and RGB encode display voltages instead, making it harder to build consistent accessible palettes.

Are my uploaded images or screenshots sent to a server?

No, every dropped file and pasted screenshot stays strictly inside your browser's local memory. Pixel sampling, 9x9 loupe rendering, and k-means palette extraction run locally with zero network requests.

How do I export extracted colors for Tailwind v4 or CSS?

Under Export palette, click CSS for :root custom properties, Tailwind for @theme --color-palette tokens, or JSON for structured multi-format data, then click Copy palette.

Updated