Extract Colors from Image

Upload a photo, logo, or inspiration image to instantly pull out the top 10 dominant colors using our Median Cut algorithm.

Drop image here or click to upload

Supports JPG, PNG, GIF, WebP. Max 10MB

Color Scheme Generator

Pick a base color and instantly generate five types of harmonious color schemes used by professional designers.

Color relationships visualized

Export Your Palette


          
        

WCAG Contrast Ratio Checker

Ensure your text is readable for all users. Check foreground / background color contrast against WCAG 2.1 AA and AAA standards.

Large Text Sample (18pt+)

Normal body text (14pt) — this is how your content looks with these colors applied to a real design.

Small text / captions (11pt)

Contrast Ratio
AA Normal≥ 4.5:1
AA Large≥ 3:1
AAA Normal≥ 7:1
AAA Large≥ 4.5:1

Live UI Preview

See your color palette applied to real web and app UI components before you commit to it.

Your Active Palette

Color Converter & Inspector

Convert any color between HEX, RGB, HSL, HSV, and CMYK instantly. See color properties at a glance.

Luminance
Perceived Brightness
Best text on this bg
CSS Name

How Our Color Palette Tool Works — The Science Behind the Colors

Median Cut Algorithm for Image Color Extraction

When you upload an image, our tool samples every pixel and organizes them in a 3D RGB color space. We then apply the Median Cut algorithm: the color space is iteratively divided into sub-boxes along the longest dimension, until we have the desired number of boxes. The average color of each box becomes one palette color. This method produces perceptually distinct colors that truly represent your image — far more accurate than simple pixel frequency counting.

For even better results, we apply a quantization refinement pass that nudges colors apart in HSL space, ensuring the extracted palette is both representative and visually distinct.

Color Harmony Theory & Scheme Generation

All color scheme generation is rooted in classical color theory, operating in HSL (Hue-Saturation-Lightness) space for perceptually accurate rotations:

  • Complementary: Hue + 180° — maximum contrast, bold & energetic
  • Analogous: Hue ±30° — naturally harmonious, low-tension combinations
  • Triadic: Hue, +120°, +240° — vibrant, balanced tension
  • Split-Complementary: Hue, +150°, +210° — high contrast but less jarring than complementary
  • Tetradic / Square: Hue, +90°, +180°, +270° — rich palette, requires careful balance
  • Monochromatic: Same hue, varying lightness / saturation — elegant and cohesive

WCAG 2.1 Contrast Ratio Calculation

Contrast ratio is computed per the W3C WCAG 2.1 specification. We first convert each color to relative luminance using the sRGB linearization formula (gamma correction with a threshold at 0.03928), then apply:

Contrast Ratio = (L1 + 0.05) / (L2 + 0.05)

where L1 is the lighter color's luminance and L2 is the darker one's. The result is compared against four thresholds: AA Normal (4.5:1), AA Large Text (3:1), AAA Normal (7:1), and AAA Large (4.5:1). This ensures every color combination you use meets accessibility standards for real users, including those with visual impairments.

Color Space Conversions — HEX ↔ RGB ↔ HSL ↔ HSV ↔ CMYK

Different design contexts need different color formats. Our converter applies precise mathematical transforms:

  • HEX → RGB: Parse hex pairs and scale to 0–255
  • RGB → HSL: Normalize to 0–1, find min/max channels, compute hue via atan2, lightness = (max+min)/2, saturation from chroma/lightness
  • HSL → HSV: Convert through RGB as intermediary for accuracy
  • RGB → CMYK: K = 1 − max(R,G,B); C = (1−R−K)/(1−K); apply for each channel

All operations use floating-point precision and are validated against industry reference values.

Export Formats Explained

Once you've built the perfect palette, getting it into your project should be instant:

  • CSS Custom Properties: --color-primary: #3B82F6; — drop straight into your :root
  • SCSS Variables: $color-primary: #3B82F6; — plug into any Sass workflow
  • JSON: Machine-readable structure — works with design tokens (Style Dictionary, Theo), React Native, or any custom pipeline
  • Tailwind Config: Ready-to-paste extend.colors block for instant Tailwind integration

Why Color Matters in Design (and Why Tools Save Hours)

Color communicates before words do. Studies show color increases brand recognition by up to 80% (University of Loyola) and influences over 85% of purchase decisions (Satyendra Singh, 2006). Yet color selection is one of the most time-consuming, subjective tasks designers face.

A structured tool removes the guesswork: instead of manually tweaking hex values and testing combinations, you extract directly from your brand's visual language, apply science-backed harmony rules, and validate accessibility — all in one workflow. What used to take hours of back-and-forth now takes under two minutes.

Frequently Asked Questions

How do I extract colors from an image?

Click the "Choose Image" button or drag & drop any JPEG, PNG, GIF, or WebP file onto the upload area. Our tool processes the image entirely in your browser using the Canvas API — no data is ever sent to a server. Within seconds, you'll see the top dominant colors extracted and displayed as a palette with their HEX, RGB, and HSL values.

What is the difference between complementary and analogous colors?

Complementary colors sit directly opposite each other on the color wheel (180° apart). They create maximum contrast and visual tension — great for call-to-action buttons or bold brand identities. Analogous colors are adjacent on the color wheel (within 30°). They feel naturally harmonious, calm, and cohesive — ideal for backgrounds, illustrations, and nature-inspired designs.

What is WCAG and why does contrast ratio matter?

WCAG (Web Content Accessibility Guidelines) is the international standard for digital accessibility published by the W3C. The contrast ratio requirement ensures text is readable for users with visual impairments, including low vision or color blindness. A ratio of 4.5:1 is the minimum for normal text (AA level), and 7:1 is recommended for enhanced accessibility (AAA). Failing to meet these thresholds can make your site legally non-compliant in jurisdictions with accessibility laws (ADA, EN 301 549, etc.).

Can I use the extracted colors commercially?

Yes. The colors themselves — mathematical descriptions of light — are not copyrightable. Any palette you create with this tool is yours to use freely in personal or commercial projects. However, be mindful that trademarked brand colors (like Tiffany Blue or UPS Brown) may have legal protections on their use in specific contexts.

How is this tool different from Adobe Color or Coolors?

This tool combines image color extraction, scheme generation, WCAG contrast checking, live UI preview, and multi-format export in a single, completely free, no-account-required workflow. Adobe Color requires a Creative Cloud account for full features; Coolors doesn't offer WCAG checking or image extraction in its free tier. Our tool processes everything client-side for maximum privacy.

Does this work offline?

All computation runs in your browser (JavaScript + Canvas API). Once the page is loaded, the image extraction, scheme generation, and contrast calculation features all work without an internet connection. Only the initial page load and Google Fonts require connectivity.

What formats can I export my color palette in?

You can export your palette as: CSS Custom Properties (for web projects), SCSS Variables (for Sass workflows), JSON (for design token pipelines, React Native, or any programmatic use), and Tailwind CSS config (for Tailwind-based projects). Copy any format with a single click.