Quick answer
To get a color palette from an image, open it in Image Edtr’s color palette tool. It lists up to eight dominant colors as hex codes with the share of the image each covers. Click or tap anywhere on the image to sample one exact pixel, then copy its hex code. Everything runs in your browser.
A photo of a sunset, a product shot, or a client’s logo often holds the colors you want for a slide, a website, or a brand sheet. The hard part is turning “that warm orange in the sky” into something a design tool or a stylesheet understands: a number. This guide explains what those numbers mean, how a palette tool decides which colors matter, and how to use the result well.
What does “color palette from image” actually mean?
There are two different jobs hiding behind the phrase, and it helps to keep them apart.
- Dominant colors. A summary of the whole picture: the handful of colors that cover the most area. Useful for mood boards, picking a background that suits a photo, or a quick theme.
- An exact color. The value of one specific spot, such as the red of a logo or the blue of a button in a screenshot. This is what an image color picker (an eyedropper) does.
Image Edtr’s color palette tool does both on the same screen. The palette appears as soon as the image opens, and the image itself works as an eyedropper.
How to get colors from an image in Image Edtr
Choose an image
Drop a JPEG, PNG, WebP, GIF, BMP, or AVIF file onto the page, or pick one from your device. It is decoded in your browser and never uploaded.
Read the dominant colors
Under Dominant colors you’ll see up to eight swatches, each with its hex code and the percentage of the image it represents.
Sample an exact pixel
Click or tap anywhere on the image. The color of that pixel appears under Sampled color.
Copy the hex code
Select Copy next to any swatch to put its hex code, such as
#3a6ea5, on your clipboard.

Hex, RGB, and HSL: how screens describe color
Almost every image you’ll open is stored as a grid of pixels, and each pixel has three channels: red, green, and blue. In a typical 8-bit image each channel holds a whole number from 0 to 255. Mixing them like light gives 256 × 256 × 256, or about 16.7 million, possible colors.
A hex code is the same three numbers written in base 16. #RRGGBB has two digits per channel, from 00 (0) to ff (255). So #ff0000 is full red with no green or blue, #ffffff is white, and #808080 is a middle gray. Converting RGB to hex is just converting each channel: rgb(58, 110, 165) becomes 3a, 6e, a5, which is #3a6ea5.
HSL describes the same colors differently, as hue (an angle around the color wheel), saturation, and lightness. It doesn’t store anything new; it’s easier for people to reason about. If you want a lighter version of a sampled blue, raising its lightness in HSL is more intuitive than guessing new RGB numbers.
| Notation | Example | Good for |
|---|---|---|
| Hex | #3a6ea5 | Copying between tools; compact and universal |
| RGB | rgb(58 110 165) | Reading channel values; adding alpha, e.g. rgb(58 110 165 / 50%) |
| HSL | hsl(211 48% 44%) | Making lighter, darker, or muted variants by hand |
All three are valid CSS color values, along with newer ones such as oklch(). The MDN reference for the CSS color type lists every form browsers accept.
How does a tool find the dominant colors of an image?
A 12-megapixel photo has twelve million pixels, and almost no two are exactly the same. Listing “the most common color” of the raw pixels would be meaningless, because the top result might cover a few dozen pixels. A palette tool has to group similar colors first. Here is exactly what Image Edtr does:
- Scales the image down so its longest side is at most 200 px. Dominant colors are about large areas, so a small copy is enough, and it keeps the work fast on phones.
- Ignores mostly transparent pixels, so the empty area around a logo on a transparent PNG doesn’t count as a color.
- Groups pixels into buckets by keeping the first 4 bits of each channel. That gives 16 levels per channel and 4,096 possible buckets. Colors that differ only slightly land in the same bucket.
- Averages each bucket, so the swatch shows the typical color of that group rather than its corner value.
- Sorts buckets by size and walks down the list, skipping any color that is very close to one already chosen, until it has eight distinct colors or runs out.
The percentage beside each swatch is that bucket’s share of all the opaque pixels. Because near-duplicates are skipped rather than merged, the percentages usually add up to less than 100%. A smaller number doesn’t mean a color is unimportant, only that its exact shade is spread across fewer pixels.
How to find the hex code of one color in a picture
When you need an exact value, such as matching a brand color from a logo file, the eyedropper is the right tool. Image Edtr reads the pixel you click from the full-resolution image, not the 200 px copy used for the palette, so small details are sampled accurately.
A few habits make the result more reliable:
- Use the cleanest source you have. An original PNG or SVG export of a logo beats a screenshot of a web page, which beats a JPEG that has been shared through a chat app several times.
- Avoid edges. Pixels along the border of a shape are blended with the background (anti-aliasing), so they sit between the two colors.
- Sample a few spots. JPEG compression and camera noise make neighboring pixels differ slightly. Click two or three places in a flat area and pick the value that repeats, or the one that looks right.
- Expect photos to vary. A red car in sunlight is dozens of reds, from highlight to shadow. There is no single “correct” hex code; choose the one that represents what you want.
Why the same color can show different values
It’s common to sample a color in two apps and get two slightly different hex codes. That’s rarely a bug. The usual causes are:
| Cause | What happens | What to do |
|---|---|---|
| Lossy compression | JPEG and lossy WebP store small blocks approximately, so a flat area gains slight variation | Sample a lossless PNG when you have one |
| Color profiles | Images tagged with a wide-gamut profile can be converted to the screen’s colors differently by different apps | Export the source in sRGB for web work |
| Anti-aliasing | Edge pixels mix the shape and background colors | Sample from the middle of a flat area |
| Resizing | Scaling averages neighboring pixels together | Sample the original size, not a thumbnail |
| Screenshots | Screen capture can apply display scaling and color settings | Sample the original asset instead of a screenshot of it |
For web work, values within a couple of steps of each other per channel are almost always indistinguishable by eye. Pick one, write it down, and use that value everywhere so your design is at least consistent with itself.
Using an extracted palette in design and CSS
A raw list of eight colors isn’t a palette yet. It becomes one when each color has a job. A simple, durable structure for a page or a slide deck:
- One or two neutrals for backgrounds and body text. Photos often supply a warm or cool off-white and a deep near-black; these feel related to the image without competing with it.
- One primary color for links, buttons, and focus states. Pick a mid-saturation color from the palette that stands out against your background.
- One accent, used sparingly for highlights or badges. This is often the small, vivid color you sampled with the eyedropper.
In CSS, store the colors once as custom properties and refer to them by role, not by hue. Then changing the theme later is a one-line edit:
:root { --color-bg: #f6f1ea; --color-text: #2b2420; --color-primary: #3a6ea5; --color-accent: #e07a3f; } and then a { color: var(--color-primary); }.
You’ll often want more shades than the image provides: a hover state slightly darker than the primary, a subtle tinted background, a border that sits between background and text. Build these from your chosen colors rather than sampling more. Keep the hue in hsl() the same and move lightness up or down in even steps, and the set will look related because it is. The newer oklch() notation does the same job with steps that look more even to the eye across different hues.
Check contrast before you commit. Text needs enough contrast against its background to be readable; the common accessibility guideline (WCAG) asks for at least 4.5:1 for normal body text. Colors pulled from a photo are often mid-tones that look lovely as swatches but fail as text colors, so you may need a darker or lighter variant. Adjusting lightness in hsl() is the easiest way to make one that still belongs to the family.
Getting better palettes from your photos
Because the palette reflects area, you can steer it by changing what the image contains:
- Crop to the part you care about. If a wide shot is mostly sky, the palette will be mostly blue. Crop to the subject first with the crop tool, then open the crop in the palette tool.
- Use a transparent background for logos. Transparent pixels are ignored, so a logo on transparency gives you only the logo’s colors instead of a large white share.
- Don’t pre-filter unless you mean to. Boosting saturation or applying a filter changes the colors the palette finds. That’s useful when you want a bolder theme, but sample the original if you need faithful values.
If you want to see how edits shift the colors, the guide on adjusting brightness and contrast explains what each slider does to pixel values.
Is it private to extract colors from a photo here?
Yes. The image is decoded and analyzed by your browser on your device. It isn’t sent to a server, and nothing about it is stored after you close the page. That makes the tool fine for unreleased designs, client work, or personal photos. The privacy page describes exactly what the site does and doesn’t collect.
Frequently asked questions
How many colors does the palette show?
Up to eight. The tool picks the largest color groups in the image and skips any that are nearly identical to one it has already chosen. A simple graphic with only three flat colors will show three swatches, because there are no other distinct colors to report.
Why don’t the percentages add up to 100%?
Each percentage is one color group’s share of all opaque pixels. Groups that are too close to a color already shown are skipped, not added to it, so their pixels aren’t counted in any swatch. The numbers tell you relative size, not a complete breakdown.
Can I get RGB or HSL values instead of hex?
The tool shows and copies hex codes. Hex converts directly to RGB: each pair of digits is one channel from 00 to ff, or 0 to 255. Most design apps and code editors accept a pasted hex code and can display it as RGB or HSL for you.
Why didn’t a small bright color appear in the palette?
The palette is ranked by area, so a small accent such as a red button in a large photo may be outnumbered by background shades. Click directly on it to sample its exact value with the eyedropper, which reads the full-resolution image.
Does the palette include transparent areas?
No. Pixels that are mostly transparent are left out before colors are grouped, so a logo saved on a transparent background gives you only the logo’s colors. Semi-transparent edge pixels that are at least half opaque are still counted, which is why soft logo edges can add a faint extra shade.
Can I pick colors from a screenshot?
Yes, a screenshot is just a PNG or JPEG image. Keep in mind that screen capture can apply display scaling, and text edges are blended with the background, so sample from the middle of a flat area. If you have the original design file or asset, sampling that is more reliable.
Is the palette the same as a design app’s color theme feature?
Not exactly. Image Edtr groups colors with fast RGB bucketing, which is good at showing what an image is mostly made of. Some design apps use perceptual clustering or aesthetic rules to suggest harmonious themes. Treat this palette as raw material to build a theme from.


