Image Dominant HEX & % Analyzer

Find the exact dominant colors and pixel coverage percentages (%) in any image using local K-Means clustering, complete with Primary/Secondary/Accent theme roles and WCAG contrast.

No uploadsNo sign-upBatch processing
K-Means Pixel Coverage %Primary / Accent Theme PreviewHEX / RGB / HSL / JSONPNG Report Card
Download
Offline engine ready100% private in-browser workspace • Zero cloud uploads
100% Private • Zero Server File Uploads

Why Use Utiliome's K-Means Dominant Color & Coverage Analyzer?

Built from the ground up for strict privacy, instant execution, and zero friction. No subscriptions, paywalls, or account registrations required.

True K-Means Pixel Area Coverage (%)

Partitions image pixels into k = 3, 5, 6, or 8 statistical clusters and calculates the exact percentage (%) of non-transparent surface area occupied by each dominant color.

Live Primary / Secondary / Accent UI Mockup

Automatically assigns your #1 Dominant background, #2 Secondary surface, and highest-saturation Accent highlight to a live UI card preview with real-time WCAG 2.1 contrast ratio scoring.

Proportional Stacked Distribution Bar

Visualize your image's chromatic balance at a glance with a proportional stacked percentage bar and one-click HEX, RGB, HSL, and JSON coverage reports.

100% Private In-Browser Execution & Batch Tabs

Analyze multiple product photos, app screenshots, or brand banners sequentially in local browser memory and download a 1200×760 PNG Dominant Color Breakdown Report.

Utiliome vs Traditional Cloud Alternatives

Compare our local-first WebAssembly engine against legacy cloud tools.

Feature Utiliome (Local Browser) Legacy Cloud Converters
Clustering Math & Area Share (%) Deterministic K-Means++ clustering with exact % pixel coverage per color Basic bucket rounding with no percentage share data
UI Theme Role & WCAG Contrast Preview Auto-maps Primary, Secondary & Accent roles + live WCAG contrast ratio Raw color list with no UI context or contrast check
Statistical JSON & Visual PNG Report One-click JSON report (HEX, RGB, HSL, %, Role) + downloadable PNG chart Manual HEX copying only
Data Privacy 100% client-side HTML5 Canvas computation (Zero server uploads) Uploads proprietary designs and photos to remote servers
How it works

How to Find Dominant Colors & Pixel Share (%) in 3 Easy Steps

No software installation required. Everything runs directly inside your web browser.

1

Drop One or Multiple Images

Drag and drop your JPG, PNG, WebP, SVG, or AVIF files into the workspace. Transparent background pixels are automatically excluded so they never skew coverage percentages.

2

Select K-Means Cluster Count (k = 3, 5, 6, or 8)

Choose k=3 for a clean Primary/Secondary/Accent breakdown (60-30-10 rule), or k=6 to k=8 for a granular chromatic distribution audit.

3

Copy HEX / JSON Report or Download PNG Breakdown

Click any cluster card to copy its HEX code, copy the full JSON percentage report, or download a high-resolution PNG Dominant Color Report.

How K-Means++ Color Clustering Finds True Dominant Colors & Pixel Share (%)

Quick Answer: Unlike fixed grid quantization that splits continuous gradients into arbitrary bins, K-Means++ iteratively groups pixels in 3D RGB space around k natural centroids and divides each cluster's pixel count by total opaque pixels to compute exact area share (%).

When analyzing a brand banner, UI screenshot, or product photograph, knowing which colors exist is only half the equation—you also need to know how much visual weight (% of surface area) each color carries.

Utiliome's Dominant Color Extractor runs an 8-iteration deterministic K-Means++ clustering pipeline directly inside your browser:

  1. Alpha-Aware Pixel Filtering: Transparent background pixels (alpha < 128 in PNG, WebP, or SVG cutouts) are stripped before clustering so transparent space is never miscounted as black (#000000) or white (#FFFFFF).
  2. K-Means++ Spread Initialization: Seeds k initial centroids by maximizing squared Euclidean distance (d² = ΔR² + ΔG² + ΔB²) between starting seeds, guaranteeing deterministic, repeatable results every time you drop the same file.
  3. Centroid Convergence & Role Classification: Ranks converged clusters by pixel share (%) to identify the Primary Dominant surface, Secondary Tone, and highest-chroma Accent Highlight.

Auditing the 60-30-10 Design Rule & Dynamic UI Theming with Dominant Colors

Quick Answer: Setting the cluster count to k = 3 lets designers and developers audit whether a layout, illustration, or room photo follows the classic 60-30-10 color proportion rule—and previews how those exact colors perform as a live UI card theme with WCAG contrast scoring.

In UI/UX engineering, interior design, and brand identity systems, balanced compositions typically follow the 60-30-10 rule:

Cluster Rank Target Area Share Design System Role & Utiliome Live Preview Mapping
#1 Primary Dominant ~55% – 65% Background / Canvas Surface: Sets the overall luminance mood (dark mode vs. light mode) in the Live Theme Preview card
#2 Secondary Tone ~25% – 35% Cards, Navigation & Containers: Supports the primary background without competing for attention
#3 Accent Highlight ~5% – 15% Call-to-Action (CTA) Buttons & Badges: Automatically selected from the cluster with the highest HSL saturation (S%) and tested for WCAG 2.1 contrast against the Primary Dominant color

Dominant Color Extractor vs. Extract Color Palette: Choosing the Right Tool

Quick Answer: Use Dominant Color Extractor when you need statistical K-Means pixel percentages (%), 60-30-10 proportion audits, and a live Primary/Secondary/Accent UI theme preview. Use Extract Color Palette when you want a diverse 5–12 swatch creative palette with mood filters and a click-to-pick pixel eyedropper.

Choose between our two complementary color tools based on whether you need statistical area measurement or creative swatch curation:

Workflow Requirement Dominant Color Extractor (This Tool) Extract Color Palette
Exact Pixel Coverage % & Stacked Bar Yes (k = 3, 5, 6, 8 K-Means clusters with % share) No (optimizes for swatch diversity over area share)
Live Primary / Secondary / Accent UI Card + WCAG Contrast Yes (real-time contrast ratio badge) No (renders uniform swatch strips)
Interactive Click-on-Image Pixel Eyedropper Automated centroid clustering Yes (click any pixel to sample & pin)
Mood Filters (Vibrant / Pastel / Warm / Cool) & CSS/Tailwind Exports JSON % report & PNG Breakdown chart Yes (exports :root CSS variables, Tailwind config & PNG Swatch Card)

Related Color & Design Tools: Extract Color Palette • Accessible Color Contrast Checker • Color Palette Generator • Material Palette Generator • CSS Gradient Generator

FAQ

Dominant Color Extractor FAQ & K-Means Clustering Guide

Everything you need to know about using Utiliome's free online dominant color extractor.

How is the dominant color percentage (%) calculated?

Utiliome runs K-Means++ clustering across all opaque pixels in your image (ignoring transparent PNG/WebP/SVG pixels). Each pixel is assigned to its nearest RGB cluster centroid, and each cluster's pixel count is divided by the total number of opaque pixels to produce an exact area percentage.

Does a transparent PNG background affect the dominant color results?

No. Any pixel with an alpha value below 50% (alpha < 128) is excluded before K-Means clustering begins, ensuring that transparent areas around logos, product cutouts, or icons never skew your dominant color percentages.

What is the best K-Means cluster count (k) to check the 60-30-10 color rule?

Select 'k=3' in the sidebar. Grouping the image into 3 dominant clusters immediately reveals the Primary, Secondary, and Accent percentage split so you can see how closely your composition matches the 60% / 30% / 10% design ratio.

How does the Live Dominant Theme Preview select the Accent color?

While the #1 cluster by pixel share becomes the Primary Dominant background and #2 becomes the Secondary surface, Utiliome evaluates the HSL saturation of the remaining clusters and assigns the most vivid, high-chroma cluster as the Accent CTA highlight—then calculates the WCAG 2.1 contrast ratio between them.

When should I use Dominant Color Extractor vs. Extract Color Palette?

Use Dominant Color Extractor when you need statistical pixel coverage percentages (%), K-Means clustering, and UI theme contrast previews. Use Extract Color Palette when you want to manually sample pixels with an eyedropper, filter by Pastel/Vibrant/Warm/Cool moods, or copy CSS/Tailwind variables.

Are my images uploaded to any cloud server during color analysis?

Never. All image decoding, K-Means clustering math, and PNG report generation run 100% locally inside your web browser.