Color Palette Extractor

Extract a beautiful color palette from any image

Click to upload file or drag and drop file here

Maximum file size: 20MB Supported formats: image/jpeg, image/png, image/webp, image/gif, image/bmp, image/tiff

Upload an image to extract its color palette

Number of colors in the palette (3-15)

Algorithm used for color extraction

How to sort the colors in the palette

Number of pixels to sample from the image

Exclude white and near-white colors

Exclude black and near-black colors

Key Facts

Category
Design & Color
Input Types
file, number, select, checkbox
Output Type
json
Sample Coverage
4
API Ready
Yes

Overview

The Color Palette Extractor allows you to upload any image and automatically extract its dominant colors to generate a cohesive color palette. Perfect for designers, developers, and artists, this tool analyzes pixel data using advanced clustering algorithms to deliver precise color schemes in seconds.

When to Use

  • When you need to extract a matching color scheme from a brand photo or product image for a web design project.
  • When creating digital art or UI mockups and you want to base your color palette on a real-world photograph.
  • When analyzing the dominant colors of an image while excluding background whites and blacks to focus on key accents.

How It Works

  • Upload an image file in JPEG, PNG, WebP, GIF, BMP, or TIFF format.
  • Configure your palette size from 3 to 15 colors and select your preferred extraction algorithm, such as K-Means Clustering or Median Cut.
  • Choose whether to skip white or black pixels and set your sorting preference by dominance, brightness, or hue.
  • Run the extractor to analyze the sampled pixels and generate a structured JSON output containing the color palette.

Use Cases

Web designers extracting a cohesive UI color scheme from a client's hero image.
Brand identity designers generating a consistent color palette from mood board photography.
Frontend developers programmatically retrieving dominant image colors to dynamically style UI backgrounds.

Examples

1. Extracting a Brand Palette from a Product Photo

Brand Designer
Background
A designer is creating a marketing landing page for a new organic skincare line and needs a natural, earthy color palette derived from the product's hero image.
Problem
Manually picking colors from the image is subjective and time-consuming, often missing the true dominant tones.
How to Use
Upload the product image, set the palette size to 5 colors, select the K-Means algorithm, and enable both 'Skip White' and 'Skip Black' to avoid background interference.
Example Config
{
  "colorCount": 5,
  "algorithm": "kmeans",
  "ignoreWhite": true,
  "ignoreBlack": true,
  "sortMode": "percentage"
}
Outcome
A clean JSON palette containing 5 dominant earthy tones sorted by their dominance in the image, ready to be used in the CSS stylesheet.

2. Creating a High-Contrast UI Theme from Artwork

UI/UX Developer
Background
A developer wants to build a dark-mode interface inspired by a specific digital painting, requiring bright accent colors sorted by brightness.
Problem
The painting has a lot of dark background pixels that clutter the palette, making it hard to isolate the bright accent colors.
How to Use
Upload the artwork, set the palette size to 8, choose the Median Cut algorithm, enable 'Skip Black', and set the sort order to 'brightness'.
Example Config
{
  "colorCount": 8,
  "algorithm": "median-cut",
  "ignoreBlack": true,
  "sortMode": "brightness"
}
Outcome
An ordered list of 8 vibrant colors from the artwork, sorted from brightest to darkest, excluding the dark background tones.

Try with Samples

image, png, jpg

Related Hubs

FAQ

What image formats are supported for color extraction?

You can upload JPEG, PNG, WebP, GIF, BMP, and TIFF images up to 20MB in size.

How does the K-Means Clustering algorithm work for color extraction?

It groups similar pixel colors together into clusters to find the most representative dominant colors in the image.

Can I exclude background colors like pure white or black?

Yes, you can enable the 'Skip White' and 'Skip Black' options to filter out near-white and near-black pixels from the final palette.

What is the maximum number of colors I can extract?

You can extract a palette containing anywhere from 3 to 15 colors.

How are the extracted colors sorted in the output?

You can sort the colors by dominance (percentage of occurrence), brightness, or hue.

API Documentation

Request Endpoint

POST /en/api/tools/image-color-palette

Request Parameters

Parameter Name Type Required Description
imageFile file (Upload required) Yes Upload an image to extract its color palette
colorCount number No Number of colors in the palette (3-15)
algorithm select No Algorithm used for color extraction
sortMode select No How to sort the colors in the palette
sampleSize number No Number of pixels to sample from the image
ignoreWhite checkbox No Exclude white and near-white colors
ignoreBlack checkbox No Exclude black and near-black colors

File type parameters need to be uploaded first via POST /upload/image-color-palette to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON Data: JSON Data

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-image-color-palette": {
      "name": "image-color-palette",
      "description": "Extract a beautiful color palette from any image",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=image-color-palette",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]