Skip to developer tool
DEVELOPER TOOLKIT CSS & COLOR

Color Palette from Image

Extract colors from an image, keep the ones you love, check readability and export a palette or brand-ready color board—all in your browser.

Browser-based · No account required · Copy and export

LOCAL-FIRST · COLOR STUDIO

Image → palette → design assets

Open an image, extract colors, refine them and export reusable palettes. Image pixels stay in your browser.

Source image

No image selected

Drop an image here, or use Choose image above.
PNG, JPEG, WebP, BMP or a decoded GIF frame · max 50 MB

Click a point to copy its source-resolution color. Enable “Pin clicked pixel” to add a locked swatch.

Image sampling and transparency settings
Sampling and extraction approximate browser-decoded sRGB. GIF input uses one browser-decoded frame. A transparent image may contain no eligible colors.

Editable palette

No colors yet

Import an image and select Extract palette to begin.

Lock colors before re-extracting. Edit HEX or name, move, copy or remove individual swatches. Fewer colors than selected is normal.

Ready. No image data is uploaded.

Copy and export

Exact format preview, no external processing

Select a palette to enable export. SVG and PNG are actual vector/raster board files.

Save, reopen or import an editable palette project

Local save is optional and may be blocked or cleared by your browser. Image pixels are not stored in project JSON. Reupload the image to re-extract.

How to use Color Palette from Image

  1. Choose a browser-supported image file up to 50 MB.
  2. Set the palette size, resolution and extraction mode; optionally select a source-image rectangle.
  3. Refine and lock swatches, check brand-role contrast in Palette Lab, then choose and download an actual CSS, JSON, GIMP, CSV, SCSS, Tailwind, SVG or PNG export.

When to use this tool

Sample a photo, logo or illustration for a starting color palette. Results depend on sampling resolution and palette size, so review the exported colors in their actual design context.

Sampling produces representative colors

The browser reduces the image to the chosen sampling resolution. By default pixels with alpha below 160 are ignored; matte mode instead composites transparency. Representative candidates are quantized and separated by an approximate OKLab perceptual distance. Vibrant, muted, light, dark and balanced modes re-rank sampled candidates. Color population shares refer only to sampled eligible pixels in a quantized bin, not an exact original-image census. A simple image may yield fewer colors than requested.

Worked example

A solid red image produces #FF0000.
CSS: --palette-1: #FF0000;
JSON: {"schema":"pixelokay-palette/v2", "swatches":[{"hex":"#FF0000", "...":"..."}]}
GIMP: GIMP Palette\n255 0 0 Red

Build a design shortlist from representative image colors

  1. Upload your own reference and request six colors as a starting workflow. Six is a maximum, not a guaranteed swatch count.
  2. Compare Most common colors with Favor saturated colors. Population and color spread can suggest different design candidates.
  3. Review small accents and transparency. Reduced-image sampling, skipped mostly transparent pixels and merged similar candidates make this an approximation rather than a full original-color inventory.
  4. Choose CSS variables, JSON HEX array or GIMP palette text according to the receiving application, then review before downloading.
  5. Evaluate foreground/background roles separately instead of assuming extracted colors form an accessible theme.

Authored workflow, no reference image or extracted result supplied. Decoding, scaling and source profiles can affect values. Use Color Converter for notation changes or Color Contrast Checker for intended solid pairs.

Brand roles and accessible color pairs

Use Palette Lab to assign primary, background, text and accent roles to actual colors. Its WCAG 2.2 ratio applies only to the two solid colors shown: normal-size text needs at least 4.5:1 for AA and large text needs at least 3:1. Text placed directly over a photo must be checked separately. The optional accessible-color suggestion is generated from the selected text color; it is not a color extracted from the image.

Formats and editable backups

CSS and SCSS give reusable variables; Tailwind output targets CSS-based @theme in Tailwind CSS v4. JSON preserves swatches, source metadata, labels, roles and locks; GIMP GPL stores RGB values and names; CSV can be opened in a spreadsheet; SVG and PNG create real swatch boards. A project backup never embeds the original photo. Browser-local saving is optional and can be cleared by browser storage eviction.

Limits and output checks

Results are approximate, not a count of every original color or a color-profile proof. Resizing and browser decoding can change sampled values. Animated formats use the frame decoded by the browser. Entirely transparent images have no eligible colors under the default skip policy; select matte compositing and upload again to use a chosen background. An unsuccessful replacement preserves the existing palette.

Reference: Canvas pixel data.

Frequently asked questions

Is the image uploaded?

Pixel processing runs in this browser. Selecting a file does not send its contents to a palette service.

Why are there fewer swatches than requested?

The setting is a maximum. Similar colors are merged and mostly transparent pixels are skipped.

What is GPL output?

It is a GIMP Palette text file listing RGB values and HEX labels, suitable for applications that import that format.

Sample colors for a design starting point

Choose an image, select the requested palette size and inspect the generated swatches. Use the palette export when the next application accepts that format.

Scope of this workflow

Sampling and browser decoding can alter values. The requested count is a maximum; similar colors can merge and transparent pixels can be skipped.

Color Palette Generator — Harmonies & CSS · All developer tools · Privacy policy · Contact PixelOkay