Icon color palette finder
Drop your icon below. The colors are worked out right here on this page, and the picture is never uploaded.
What it does
Drop in your app icon, a PNG or a JPEG, and the tool picks out the five colors that cover the most of it. For each one it gives you the hex code, the RGB and HSL values, how much of the icon it covers, and how readable white text and black text are on top of it. It also names the most colorful of them as a good accent color, and writes the whole palette as CSS variables, SwiftUI colors and a Markdown table. Use it for your website, your Sparkle release notes, a launch post, a menu bar tint or an App Store screenshot background, so everything around the icon matches it.
How it picks the colors
The icon is drawn small, in your browser, and every pixel that is mostly opaque is sorted into a color bucket. The buckets that cover the most pixels win, and a color that is very close to one already picked is merged into it. That is simple and easy to follow, and it is not how a designer would choose. A thin highlight or a small glyph may not make the list, because the tool counts area, not importance. Clear pixels are ignored, which is why a rounded icon with transparent corners doesn't give you a transparent color.
How the contrast is worked out
Contrast uses the WCAG 2 formula from the W3C: the relative luminance of each color, then (lighter + 0.05) divided by (darker + 0.05). The result runs from 1:1 to 21:1. W3C asks for 4.5:1 for normal text and 3:1 for large text, and the tool marks each color against those two numbers. Those are web guidelines. Apple's own accessibility guidance for Mac apps has its own tools and targets, so treat the ratio as a quick, honest first check and not a verdict.
Put the colors to work
/* CSS */
:root { --icon-color-1: #C81E28; }
// SwiftUI
static let iconColor1 = Color(red: 0.784, green: 0.118, blue: 0.157)In an app, don't hard-code your icon colors for text and controls. Put an accent color in your asset catalog, so it can have a dark appearance too, and let people's system accent color win where Apple expects it to. Check the result on a light and a dark background before you ship it.
What each result means
| Mark | What it means |
|---|---|
| OK | We found a palette. Colors are listed from the largest area to the smallest. |
| Note | The icon is almost all one color, so there is only one color to show, or the picture is mostly clear. |
| Fix | We could not read the file. Try a PNG or JPEG under 30 MB. |
Questions
Is my icon uploaded anywhere?
No. The picture is read and drawn in your browser, and nothing is sent.
How does it pick the colors?
It counts how much of the icon each color covers, keeps the biggest, and merges colors that are very close. Area counts, importance does not, so a small highlight can be missed.
What contrast ratio is enough for text?
The W3C WCAG 2 guidelines ask for 4.5:1 for normal text and 3:1 for large text. The tool shows the ratio of white and of black on each color, so you can see which one passes.
Can I use a JPEG or a PNG with a clear background?
Yes to both. Mostly clear pixels are left out, so the colors come from the visible part of the icon.