VulCode

Palette from an image

Drop in an image and get its dominant colours as hex codes.

Category
Graphics
Price
free

The tool starts in your browser.

Everything is calculated in your browser. Nothing you type is sent to our server.

How to use it in three steps

The tool as a schematic with this page's example. Each step's number stands where you take it: in the fields, at the result or outside the tool.

Palette from an image
What you enter
A 10 x 10 px image: 50 pixels of #414df2, 20 of #4650f0, 20 of #f4efe6 and 10 transparent ones
  1. Drop in an image or photo.

What you get
#424ef1 78% #f4efe6 22%
  1. See the dominant colours.

  2. Copy the hex codes.

A hundred pixels and the two colours left of them

A photo holds thousands of shades of the same colour. The tool joins close shades into groups and lists the largest, each as the average colour of its pixels with its share of the image. The result is computed by the same function the tool at the top of the page uses, every time the page is shown.

You drop in

Image
10 x 10 px
Pixels
50 x #414df2, 20 x #4650f0, 20 x #f4efe6, 10 transparent

Transparent

Counted
90 of 100 pixels
What the tool does

A pixel with opacity below 128 out of 255 is not counted, so a PNG's background does not become a colour.

Groups

#414df2
3-3-10
#4650f0
3-3-10
#f4efe6
10-10-10
What the tool does

The tool divides each colour channel by 24 and rounds it. Shades with the same result land in one group.

Average and share

#424ef1
70 pixels, 78%
#f4efe6
20 pixels, 22%
What the tool does

A group's colour is the average of its pixels, and its share is its part of the counted pixels, rounded to a percent.

The palette

  • #424ef1 78%
  • #f4efe6 22%

Questions

Related tools

The tool does one job. If the same thing should happen automatically in your bot, server or system, we build it.

Missing a tool you need?

Tell us what you want to calculate or generate. We will tell you whether a tool is enough or an integration in your system fits better.