# App icon color palette

> Drop your icon to get the five colors that cover most of it, ready for SwiftUI, Xcode, your website and your App Store screenshots. Your file stays in your browser.

Use it here: https://ipip.fyi/tools/app-icon-color-palette (it runs in your browser, nothing is uploaded).

## What it does

Drop in your iPhone or iPad app icon, a PNG or a JPEG, and it picks out the five colors that cover the most of it. For each one you get the hex code, RGB and HSL, how much of the icon it covers, and how well white text and black text read on top of it. It names the most colorful one as an accent color and writes the palette four ways: SwiftUI colors, a Contents.json for Xcode's AccentColor, CSS variables and a Markdown table.

Use it to match your App Store screenshot backgrounds, your website, a launch post or your app's own tint to the icon people already know.

## How does it pick the colors?

The icon is drawn small, in your browser, and every mostly opaque pixel goes into a color bucket. The buckets that cover the most pixels win, and a color very close to one already picked is merged into it. That counts area, not importance, so a thin highlight or a small glyph may not make the list. Clear pixels are left out.

## How is the contrast worked out?

With the WCAG 2 formula from the W3C: the relative luminance of each color, then (lighter + 0.05) divided by (darker + 0.05). It runs from 1:1 to 21:1. W3C asks for 4.5:1 for normal text and 3:1 for large text, and each color is marked against both. Those are web guidelines. In your app, also check the colors with Xcode's Accessibility Inspector and in both light and dark mode.

## Put the colors to work

| Output | Where it goes |
| --- | --- |
| SwiftUI | `Color(red:green:blue:)` values in sRGB, for views and previews |
| Xcode AccentColor | Assets.xcassets/AccentColor.colorset/Contents.json, the color Xcode uses as your app's tint |
| CSS | `--icon-color-1` and on, for your site or press kit |
| Markdown | A table for a README, a press kit or a launch post |

Apple's Human Interface Guidelines say your brand color can work well as the app accent color when your content is mostly plain, and ask that every custom color gets a light and a dark variant, each with an increased contrast option. So after you add the AccentColor file, give it those appearances in Xcode and look at each one.

## What it can't tell you

It reads one flat picture. It doesn't see the dark, clear or tinted versions of your icon that you make in Xcode or Icon Composer, and it can't tell which color matters most to your brand. Run it on each version you export if you want their colors too.

## Questions

**How do I get the hex colors of my app icon?**

Drop the icon on this page. It lists the five colors that cover most of it, largest first, with each hex code, RGB and HSL value ready to copy.

**How do I set an accent color for my iPhone app?**

In Xcode, open Assets.xcassets and the AccentColor color set, and pick the color there. This tool writes that color set's Contents.json from your icon, and you can add a dark appearance in Xcode.

**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 text on each color, so you can see which passes.

**Why is a small part of my icon missing from the palette?**

The tool counts how much of the icon each color covers. A thin outline or a small symbol covers few pixels, so it can lose to the background and the main shape.

**Is my icon uploaded anywhere?**

No. The picture is read and drawn in your browser, and nothing is sent to iPip or anyone else.

## Sources

- [Apple: Human Interface Guidelines, Color](https://developer.apple.com/design/human-interface-guidelines/color)
- [Apple: Human Interface Guidelines, App icons](https://developer.apple.com/design/human-interface-guidelines/app-icons)
- [Xcode Help: Specifying your app's color scheme](https://developer.apple.com/documentation/xcode/specifying-your-apps-color-scheme)
- [W3C: Understanding WCAG 2 contrast (minimum)](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html)

Updated November 27, 2026.

Source: https://ipip.fyi/tools/app-icon-color-palette
