Back to articles

    How to Extract a Color Palette From an Image

    November 14, 2026•9 min read•Tutorial

    Extract a color palette from any image in your browser: set palette size, exclude near-black and white, copy HEX or RGB, and use the colors in backgrounds.

    Picbolt Screenshot Tool

    To extract colors from an image, open Picbolt's free Image Color Picker and drop, paste or upload the image. It shows a Dominant Color and an Extracted Palette of 5 to 20 colors. Click any swatch to copy its HEX or RGB value. If you only need the exact color of one spot on your screen, your Mac already has a tool for that: Digital Color Meter.

    Below you'll find both methods, the two settings that change the palette most, and how to use the colors in backgrounds and graphics.

    Why extract a palette from an image

    A palette pulled from an image gives you colors that already match it. Common reasons to extract one:

    • Backgrounds that fit a screenshot. A gradient or solid color taken from your app's UI looks like it belongs with it.
    • Brand colors from a logo or photo when nobody has the HEX codes written down.
    • Matching a mood board or photo for a slide, a social post or a website section.
    • Text and accent colors for a graphic built around a hero image.

    A color picker and a palette extractor do different jobs. A picker tells you the color under your cursor. An extractor looks at the whole image and groups similar pixels into a small set of representative colors. For a photo, where no single pixel is "the" color, the extractor is usually what you want.

    Sample one color on a Mac with Digital Color Meter

    Digital Color Meter comes with macOS and reads the color under the pointer anywhere on your screen, in any app.

    1. Open the image in Preview, a browser or any other app.
    2. Open Digital Color Meter. It's in Applications > Utilities, or press ⌘Space (Command-Space) and type its name.
    3. In the pop-up menu at the top of its window, choose Display in sRGB if the color is going on the web.
    4. Choose View > Display Values > as Hexadecimal to get HEX instead of decimal values.
    5. Hold the pointer over the spot you want.
    6. Press ⌘L (Command-L) to lock the reading, so moving the pointer to the menu bar doesn't change it.
    7. Choose Color > Copy Color as Text.

    What it can't do: it reads one spot at a time and doesn't build a palette. On photos, neighboring pixels often differ slightly because of noise and compression, so the value depends on exactly where the pointer lands. Use it for flat UI colors and logos. For photos, use a palette extractor.

    Extract colors from an image with Picbolt's Image Color Picker

    The Image Color Picker runs in your browser. Your image is processed on your device and never uploaded. The tool is free, needs no sign-up, and doesn't count toward the free plan's 3 downloads a day.

    Add the image

    You can load an image in three ways:

    • Paste it. Copy an image, for example by right-clicking an image in a browser and copying it, or by taking a screenshot straight to the clipboard with ⌃⇧⌘4 (Control-Shift-Command-4). Then press ⌘V on a Mac or Ctrl+V on Windows while the page is open.
    • Drop it. Drag an image file from Finder or your desktop onto the page.
    • Upload it. Use the file picker to choose the image.

    The page then shows two results:

    • Dominant Color, the single color that best represents the image.
    • Extracted Palette, the set of colors below it.

    Copy a color

    1. Click a swatch.
    2. Wait for the message Color copied to clipboard!
    3. Paste the value where you need it.

    Swatches copy one at a time, and there's no palette file export. For 10 colors you copy 10 times, so paste each value into a note as you go.

    Palette size and the dark/light exclusion

    Two settings decide what ends up in your palette. A third controls the format.

    SettingOptionsDefaultWhat it changes
    Palette Size5–2010How many colors the palette contains
    Exclude very dark/light colorsOn or offOnLeaves near-black and near-white out of the palette
    Color FormatHEX or RGBHow swatch values are shown and copied

    Choose a palette size

    • 5 colors gives you a short set you can actually use: a background, an accent and a text color. Small details in the image tend to drop out.
    • 10 colors (the default) suits most photos and screenshots.
    • 15 to 20 colors helps when a small accent matters, like a button color in a mostly gray app screenshot or a thin stripe in a logo. Expect several close shades of the main colors at this size.

    If you can see a color in the image but it isn't in the palette, raise the size first.

    When to turn off "Exclude very dark/light colors"

    The exclusion is on by default. Most images contain shadows, highlights and white borders that would otherwise fill the palette with black and white.

    Turn it off when:

    • The image is a dark-mode screenshot and you want its near-black background color.
    • The brand uses black or white as a real brand color, such as a black logo on white.
    • You're matching a minimal, light design where the off-white is the color you care about.

    The tool doesn't say exactly where "very dark" and "very light" begin. If you're unsure, compare the palette with the setting on and off.

    HEX vs RGB: which format to copy

    Switch formats with Color Format. Both describe the same color, so choose whichever the destination asks for.

    FormatExampleUse it for
    HEX#1E6FD9CSS, Figma, most design tools, brand guides
    RGB30, 111, 217CSS rgb() values and code that expects three numbers from 0 to 255

    The extractor doesn't output HSL. HSL is the easiest format for making lighter and darker versions of a color. To get it, use the Color Picker:

    1. Open the Color Picker.
    2. Type or paste the HEX value into its HEX field.
    3. Click Copy HSL (or Copy HEX / Copy RGB).

    You can also adjust the color there with the saturation square, hue slider and alpha slider before copying. The Color Picker's RGB output doesn't include alpha, so if you set transparency, add it to your CSS yourself. Neither tool has an eyedropper or CMYK output.

    Use the palette in your designs

    Background for a screenshot that matches it

    If you want a background that fits a screenshot, you may not need to extract anything by hand. In the Screenshot Mockup editor, open the BG tab and look at MAGIC GRADIENTS. These gradients are generated in your browser from the colors in the image on the canvas. Click SHUFFLE for new combinations. To use a color from a different image, such as a brand photo or logo, extract it first and then set it as a solid background:

    1. Add your screenshot to the editor.
    2. Open the BG tab.
    3. Under CUSTOM BG, click the color button and set it to your extracted color.
    4. Optional: raise Noise Amount under NOISE so a flat color looks less plain.

    On the free plan, exports from this editor carry a "Made with Picbolt" watermark, export at 1x and count toward 3 downloads a day. For more background options, see how to add a background to a screenshot.

    Gradients and patterns from two palette colors

    • Gradients: two neighboring colors from the same palette usually blend well. See making a gradient background image, and mesh gradient backgrounds for the softer, multi-point style.
    • Patterns: the SVG Backgrounds generator has Primary Color and Secondary Color settings. Set two palette colors, click Generate SVG Background, then use Download SVG, Copy CSS or Copy SVG Code. It's free and unlimited.

    Text, cards and icons

    Check contrast before using colors for text

    Colors from the same photo are often close in brightness, so text in one palette color on a background in another can be hard to read. For body text, aim for a contrast ratio of at least 4.5:1 (the WCAG AA level). The usual fix is to keep palette colors for backgrounds and accents and set text in near-black or white. Turn the dark/light exclusion off if you want those to come from the image too.

    Methods compared

    MethodCostWhat you getBest forCan't do
    Digital Color Meter (macOS)Built inThe color under the pointerFlat UI colors, logos, anything already on screenBuild a palette; Mac only
    Picbolt Image Color PickerFree, no sign-upDominant color plus 5–20 colors, HEX or RGBPhotos, screenshots, brand imagesPick a specific spot; HSL; export a palette file
    Picbolt Color PickerFree, no sign-upHEX, RGB and HSL of a color you enter or adjustConverting and fine-tuning extracted colorsRead colors from an image

    If it doesn't work

    Pasting does nothing. The clipboard may not hold image data. Copying a file in Finder, for example, doesn't always paste into a browser as an image. Drag the file onto the page or use the file picker instead.

    The palette has no black or white, but the image clearly does. Exclude very dark/light colors is on by default. Turn it off.

    The palette is full of near-identical shades. The palette size is too high for a simple image. Lower Palette Size to 5 or 6.

    A small accent color is missing. Large areas outweigh small details. Raise Palette Size toward 20. You can also crop the image to the area you care about with the free Crop Image tool (files up to 15 MB; it doesn't count toward the daily limit) and load the cropped version. For one exact spot, use Digital Color Meter.

    The copied value doesn't match another tool. Tools can report slightly different values for the same image because of color profiles. In Digital Color Meter, choose Display in sRGB for web work. A palette swatch also won't exactly match any single pixel, because it represents a group of similar pixels.

    FAQ

    Is the Image Color Picker free? Yes. It needs no account and doesn't count toward the free plan's 3 downloads a day.

    Does my image get uploaded? No. The palette is calculated in your browser, and the image stays on your device.

    Can I click a spot on the image to get its color? Not in Picbolt, since the extractor works on the whole image. On a Mac, use Digital Color Meter for a single spot.

    Can I save the palette as a file? No. Copy each swatch's value and keep them in a note, your CSS or your design tool.

    If you're extracting colors to style a screenshot, start in the Screenshot Mockup editor and try MAGIC GRADIENTS first. It may give you a matching background without any copying.

    Share this article