PixKit

Home / All Tools /Utility

Color Palette Extractor

Median-cut clustering extracts 5–8 dominant colors with share, copy and JSON/CSS/PNG export.

✓ Local processing · No uploads · No signup

Drop an image, or click to browse

Median-cut clustering; transparent pixels are ignored

Sorted by pixel share

    Real-world uses

    • Build a landing page palette: drop the hero image, extract 6 colours, copy the one or two highest-share HEX values as primary and accent, then export CSS to get --color-1 through --color-6 variables ready to paste.
    • Document a design system: extract 5 and then 8 colours from the same image, use Copy all to paste the HEX list into a review doc, and export JSON for per-swatch RGB and share values to check against the implementation.

    Limits: Clustering runs on a 360px thumbnail with pixels quantised to 5 bits per channel (32 levels), so colours are approximations and shares come from the thumbnail rather than the full image. Pixels with alpha below 128 are skipped, and a flat image may return fewer swatches than requested.

    Related tools:Sample one exact pixelGenerate a placeholder in your main colourTurn a key colour into a full scheme

    How it works

    1. Uploading triggers one analysis; changing the colour count (5-8) or clicking Extract runs it again
    2. Review each swatch's HEX and share, then copy one value or the whole list
    3. Export JSON with RGB and share, CSS variables, or a palette PNG with 120px cells as needed

    FAQ

    Are transparent pixels counted?

    No. Pixels with alpha below 128 are ignored so transparent areas do not skew the palette.

    Why do the swatches differ from colours picked in a design file?

    Pixels are quantised to 32 levels per channel and then averaged within each box, so a swatch is a representative colour rather than the most frequent exact HEX. Use the Image Color Picker to read one exact pixel.

    How is the share calculated?

    It is the pixel count in that colour box divided by all counted pixels, sorted from highest to lowest. Counting runs on a 360px thumbnail and ignores pixels with alpha below 128. The share field in the JSON export is a percentage rounded to two decimals.

    Related tools