XTools Logo
XTools
Blog
/
Color ConverterContrast CheckerGradient GeneratorPalette from ImageColor Palette GeneratorColor Blindness SimulatorImage Color Picker

© 2026 XTools. All rights reserved.

Privacy PolicyContact Us

    Palette from Image

    Pull the main colors out of a photo and copy them as HEX, CSS, or Tailwind
    • Files never leave your device
    • Runs in your browser
    • Free, no sign-up, no watermark

    Drop an image here, or click to choose

    Accepts JPG, PNG, WebP, GIF, HEIC, AVIF · You can also paste with Ctrl+V / ⌘V

    Related tools

    • Color Converter
    • Contrast Checker
    • Gradient Generator
    • Color Palette Generator
    • Color Blindness Simulator
    • Image Color Picker

    How to use Palette from Image

    Pull the main colors out of a photo or screenshot, 3 to 16 of them, each with its share of the image. It also picks Android-style swatch roles (vibrant and muted, light and dark) and exports to CSS, Tailwind, JSON, GIMP .gpl or Adobe .ase.

    1. 1

      Drop an image (JPG, PNG, WebP, GIF, HEIC or AVIF) or click to choose one.

    2. 2

      Move the Colors slider to choose 3 to 16 colors and Sort by Prominence, Hue or Lightness.

    3. 3

      Hover a swatch or the image to see where each color appears, and click a swatch to copy its HEX.

    4. 4

      Under Export, choose HEX, CSS, Tailwind or JSON and copy the code, or download GIMP / Inkscape (.gpl) or Adobe (.ase).

    Frequently asked questions

    Is my image uploaded?

    No. The image is decoded and analyzed in your browser and never leaves your device.

    How are the colors picked?

    The tool runs weighted k-means clustering in OKLab on a copy of the image scaled down to at most 256 px, so each color represents an area rather than a single pixel. For one exact pixel, use the Image Color Picker.

    Why does a swatch role say None?

    Roles are chosen from 16 candidate colors the way Android's Palette API does it. If no candidate fits, for example a vibrant color in a grey photo, the role stays empty.

    Are transparent areas counted?

    No. Transparent pixels are ignored, so a logo on a transparent background gives the logo's colors only.

    Can I use the palette in Photoshop or GIMP?

    Yes. Download Adobe (.ase) to load it as swatches in Adobe apps, or GIMP / Inkscape (.gpl) for GIMP and Inkscape.