Color Palette Generator: Extract HEX Colors from Any Image
By Bilal Siddiqui, GD Graphic · Last updated: December 4, 2026 · 10 min read
To make a color palette from an image, open the GD Graphic Color Palette Generator, upload a photo, pick colors from the extracted spectrum or with the eyedropper, tune the mood, shades and gradients, check contrast, then copy HEX, RGB or HSL codes or export CSS variables, Tailwind, SCSS, JSON or SVG. It runs in your browser, so your image stays on your device.

Key facts
How to make a color palette from an image (4 steps)

- Upload an image. Browse, drag and drop, or press Ctrl+V. JPG, PNG, WebP and SVG work. A logo, photo or screenshot is a good start.
- Pick your colors. The tool extracts a spectrum of 12 colors. Click a tile to use it, or click the image with the eyedropper to grab an exact pixel.
- Tune the palette. Try the Vibrant, Pastel, Deep or Light mood, use a sample palette such as Sunset Glow or Nordic Slate, or press Randomize.
- Copy or export. Copy all HEX codes, CSS variables or the active color, or export a file.
HEX, RGB and HSL: which code should you copy?
| Code | Example | Best for |
|---|---|---|
| HEX | #dc2743 | Web design, CSS, design tools |
| RGB | rgb(220, 39, 67) | Screens, code that needs separate channels |
| HSL | hsl(351, 72%, 51%) | Making lighter or darker versions of one color |
All three describe the same color, here the tool’s sample base color. Use HEX in most web work, and HSL when you want to adjust lightness by hand.
Build a palette you can actually use
A pretty set of swatches is not yet a design system. Give every color a job, then check it in the live UI mockup (it also has a dark canvas option and a Shuffle button that swaps the roles).
| Role | Share of the design | What it does |
|---|---|---|
| Background / neutral | about 60% | Gives space and keeps text readable |
| Secondary color | about 30% | Supports headings, cards and sections |
| Accent color | about 10% | Draws attention to buttons and key actions |
| Text color | As needed | Must pass a contrast check against the background |
Pick a mood
| Mood mode | Feel | Good for |
|---|---|---|
| Vibrant | Bold, saturated | Brands that want energy, ads, social posts |
| Pastel | Soft and light | Beauty, wellness, kids, gentle backgrounds |
| Deep | Dark and rich | Premium looks, dark mode, tech |
| Light | Bright and airy | Clean websites and dashboards |
The tool also has a Color Harmonies engine for building related colors. If you like to follow classic color theory, such as complementary or analogous schemes, use it as a starting point and judge the result by eye and by contrast.
Shades, tints and gradients
- Tints and shades: the spectrum starts from a base color (the example is
#dc2743). Click any step to copy it. Lighter steps suit backgrounds, darker steps suit text and hover states. - Gradients: choose Linear, Radial, Mesh or 3-Stop, set the angle (135° by default) and copy the CSS.
- Brand colors: pull colors from your logo, then reuse them in the Favicon Generator and QR Forge so everything matches.
Check color contrast before you publish

Contrast tells you how easy text is to read. The WCAG 2.1 matrix in the tool rates a pair as AAA at 7.0 or higher, AA at 4.5 or higher, AA Large at 3.0 or higher and Fail below 3.0. Normal text should reach at least AA. Black on white is the maximum at 21:1. Here are examples from the palette above:
| Text | Background | Contrast ratio | Rating |
|---|---|---|---|
| White #FFFFFF | Navy #1E3A8A | 10.36 : 1 | AAA |
| Dark #1F2937 | Soft yellow #FDE68A | 11.79 : 1 | AAA |
| White #FFFFFF | Red #EF4444 | 3.76 : 1 | AA Large only |
| White #FFFFFF | Orange #F97316 | 2.8 : 1 | Fail |
#dc2743 with white text gives about 4.76:1, a pass for AA. Orange #f97316 with white text fails, so use dark text on orange instead.The Color Vision Deficiency simulator shows how your palette may look to people with color blindness. Never use color as the only way to show meaning. Add a label or an icon too.
Export to CSS, Tailwind, SCSS, JSON or SVG

| Export | Use it for |
|---|---|
| CSS Variables | Any website: paste into :root and reuse the colors |
| Tailwind CSS | Tailwind projects: a ready-to-paste color set |
| SCSS | Sass projects |
| JSON | Apps, design tokens and scripts |
| SVG Vector | Sharing a scalable palette graphic |
| PNG palette card (1200 × 630) | Presentations, portfolios and social sharing |
Need the palette inside an image or a social post? Resize it with the Social Media Resizer, or place it on a board with the Collage Maker. To change an image format first, use the Image Converter.
Common color palette mistakes
| Mistake | Why it hurts | Fix |
|---|---|---|
| Using too many colors | The design looks busy and has no focus. | Stick to 3 to 5 colors plus neutrals. |
| Text with low contrast | Many people cannot read it. | Check every text and background pair for AA. |
| Relying on color alone | Color-blind users can miss the meaning. | Add icons, labels or patterns. |
| Picking colors from a dull photo | The palette looks muddy. | Choose a vivid image or switch the mood mode. |
| Pure black on pure white everywhere | Harsh and tiring to read. | Use a dark gray (such as #1F2937) for text. |
| Not testing on dark mode | Colors can clash. | Use the dark canvas option in the mockup. |
Is my image private?
The page states that the tool is 100% private and client-side, so the image you pick colors from is processed in your browser. The meta description also says no signup is needed.
Frequently asked questions
Ready to find your colors?
Upload an image, pick your palette, check the contrast and export. Free and private.
Related tools: Favicon Generator · QR Forge · Collage Maker · Image Converter · Social Media Resizer · CV Generator · All free tools