About

From a photo to a palette you can ship

Pull a UI palette from a photo or a single color, get palette ideas and gradients, check contrast and export the code. Free, in your browser.

Open the app
NN Color Extractor with the sample sunset image and the 5-role palette taken from it

Why it exists

A handful of HEX codes is not a palette. When you build an interface, the real questions are which color is the background, which one goes on the main button, and whether the text is readable.

NN Color Extractor sorts colors into 5 roles, checks their contrast and shows the palette on sample UIs before you export.

  • Background #F3F1F3
  • Surface #EBE3EC
  • Soft #EDD4F1
  • Accent #FED06E
  • Foreground #2F2440
The palette the app takes from its sample image.

More than a color picker

Each tool has its own page that opens on it. They all share one palette, so you go from ideas to contrast checks and export without typing anything twice.

How it picks colors

  1. Clusters pixels in OKLab

    The image is scaled down to at most 150×150 pixels and grouped into 8 color clusters with K-Means++. You can choose from 5 to 12.

  2. Finds the dominant color

    The cluster with the largest area, after penalizing colors that are too dark, too light or too gray.

  3. Finds the accent

    A small cluster that clearly differs from the dominant color, measured with the CIEDE2000 color distance.

  4. Measures contrast properly

    WCAG 2 ratios and APCA values for every text and background pair. The 50-950 scales and suggested fixes are computed in OKLCH.

The Export tab of the app showing a Tailwind @theme block for the sample palette

Exports what your project needs

CSS, Tailwind v4, shadcn/ui, MUI, Chakra and Material 3 themes, design tokens, Tokens Studio for Figma, SwiftUI, Android, Procreate, Adobe .ase, and VS Code and terminal themes. Copy or download, with 50-950 scales, status colors and chart colors when you want them.

Tailwind palette generator

What stays the same

Images stay in your browser

Images are decoded and analyzed on your device, in a Web Worker. No image or color is sent to a server.

Read the privacy policy

Free, no account

No ads, no sign-up, no limit on the number of images.

Repeatable results

The same image and settings always give the same palette. Press Space to try a different grouping.

Who makes it

NN Color Extractor is designed and built by Nghiệp Nguyễn as an everyday tool for interface work.

Open the app

Updated: