GenWorldAI
Free tool, works in your browser

Color Palette From Image Extractor

Drop, pick or paste any photo or frame to extract 5 to 10 dominant colors locally in your browser. Copy HEX, RGB, HSL, OKLCH, CSS variables or Tailwind v4 tokens, save a PNG swatch card, or generate matching AI art.

Try a sample:
Colors:

100% local canvas sampling. Your photo is never uploaded.

  • HEX, RGB, HSL, OKLCHEvery swatch includes perceptual OKLCH and WCAG text contrast ratios.
  • CSS, Tailwind & JSONCopy production-ready CSS custom properties or Tailwind v4 @theme tokens.
  • 1200 × 640 PNG cardDownload a clean, unbranded palette reference card with HEX and RGB labels.
  • Private & freeRuns locally in your browser canvas. Your image never leaves your device.

Extract a color palette from any image in 3 steps

Upload or paste a picture, pick how many colors you want, and export the codes.

  1. JPG · PNG · WebP · Clipboard
    1

    Drop or paste your photo

    Upload any JPG, PNG or WebP image from your device, paste a screenshot directly with Ctrl+V, or click a sample image to test.

  2. #1E3A5F#2F6F8F#D97B43#F2B86B
    2

    Inspect 5 to 10 dominant swatches

    Our median-cut and k-means quantizer identifies balanced dominant colors ranked by pixel share, with HEX, RGB, HSL, OKLCH and WCAG contrast.

  3. @theme {
    --color-1: oklch(0.35 0.08 248);
    --color-2: oklch(0.68 0.14 55);
    }
    3

    Copy tokens, download PNG or create AI art

    Copy CSS variables, Tailwind v4 tokens or JSON, save a 1200 × 640 swatch PNG, or send the palette directly into GenWorldAI Text to Image.

Designed for colorists, UI designers and AI prompt creators

More accurate than single-pixel eyedroppers, with modern OKLCH and WCAG values built in.

Perceptual OKLCH + WCAG contrast on every swatch

Alongside standard HEX, RGB and HSL, each color reports its OKLCH coordinates and whether dark or light text achieves the highest WCAG contrast ratio on top of it.

#D97B43WCAG 7.4:1
RGB(217, 123, 67) · HSL(22°, 66%, 56%) · OKLCH(0.67 0.14 51)

Export CSS variables, Tailwind v4, JSON or PNG

Switch tabs to copy ready-to-paste :root variables, Tailwind CSS v4 @theme tokens or structured JSON, or download a high-resolution PNG card for moodboards.

CSSTailwindJSONPNG

Feed your extracted palette directly into AI image generation

Found a film still with unforgettable color grading? Click Generate AI art to open Text to Image pre-filled with your exact HEX color palette.

Creates a ready-to-run Text to Image prompt preloaded with your extracted HEX palette.

Guide: building cohesive video and UI palettes from film stills

Why perceptual color extraction beats random sampling and how to apply a 60-30-10 color balance.

How median-cut + k-means palette extraction works

Simple histogram counters often fill a palette with five nearly identical shades of sky blue. This extractor first partitions sampled pixels along their widest color channel (median-cut), then refines cluster centers using perceptually weighted redmean k-means so shadows, midtones and accent highlights all stay represented.

The top strip shows each swatch proportional to its share of the image, making it easy to spot the dominant backdrop versus smaller accent colors.

#1E3A5F#2F6F8F#D97B43#F2B86B

Pulling color palettes straight from video frames

Want the color mood of a favorite scene in a video? Grab any exact frame locally with our Video Frame Extractor, drop that PNG here to capture its HEX and OKLCH tones, and reuse the palette in your titles, thumbnails or AI prompts.

Creates a ready-to-run Text to Image prompt preloaded with your extracted HEX palette.

Who uses this color palette extractor

Fast, private color inspiration for visual teams.

  • #1E3A5F#2F6F8F#D97B43#F2B86B

    Colorists & video creators

    Match title cards, YouTube thumbnails and lower-thirds to the exact color grade of your footage.

  • #D97B43WCAG 7.4:1
    RGB(217, 123, 67) · HSL(22°, 66%, 56%) · OKLCH(0.67 0.14 51)

    Web & UI designers

    Pull OKLCH and WCAG-checked CSS or Tailwind tokens from brand photography in seconds.

  • Creates a ready-to-run Text to Image prompt preloaded with your extracted HEX palette.

    AI artists & illustrators

    Extract a reference palette and send it straight into Text to Image for cohesive series art.

Color palette from image FAQ

Quick answers about extracting colors locally in the browser.

Is my uploaded photo sent to a server?

No. The image is drawn onto an offscreen canvas inside your browser tab to read pixel colors locally. Nothing is uploaded or saved.

What color formats can I copy?

Every swatch displays HEX, RGB, HSL, OKLCH and its WCAG contrast ratio against dark or light text. You can also copy the full palette as CSS custom properties, Tailwind CSS v4 @theme tokens, JSON or a 1200 × 640 PNG swatch card.

Can I paste a screenshot directly from my clipboard?

Yes. Copy any picture or screenshot and press Ctrl+V (or Cmd+V on Mac) anywhere on the page to extract its palette immediately.

How many colors can I extract?

Pick 5, 6, 8 or 10 dominant swatches from the toolbar and watch the palette recalculate instantaneously.

Turn your extracted palette into original AI artwork

Extracting palettes is free forever. Click below to open Text to Image and generate cohesive visuals built around your colors.

  • Runs locally in your browser
  • Free palette extractor
  • No sign-up required