🎨 Color Picker from Image
Upload an image, click any pixel — get HEX, RGB & HSL instantly
JPG, PNG, WebP, GIF, BMP supported
Picked Color
—
Why Your Design Eye Is Not Enough — And What Pixel-Level Color Picking Actually Solves
Here's a situation most designers know too well: you're looking at a competitor's website, or a stunning product photo, or even a screenshot from a Netflix show — and there's this perfect muted olive-green in the background. You try to eyeball it. You dial in something close in Figma. But close is not the same as exact, and the moment you put your approximation next to the original, you can feel the difference even if you can't quantify it.
That's the gap a color picker from image fills. Not the creative decision about which color to use — that remains yours — but the precise extraction of what's actually there, at the pixel level, in three different color systems so you can use it wherever your workflow takes you.
What HEX, RGB, and HSL Actually Mean in Practice
The tool gives you three representations of the same color. They're not interchangeable in practice, even though they describe the same point in color space.
HEX is what you reach for when dropping values into CSS, Tailwind config files, or design tokens. It's compact, copy-pasteable, and universally understood by browsers. Something like #3d7a8a is instantly usable in any stylesheet without conversion.
RGB is how screens actually think about color — three channels, each 0–255, mixing red, green, and blue light. It's useful in CSS too (rgb(61, 122, 138)), but its real power is when you're doing programmatic color work: blending two colors, adjusting opacity, or writing JavaScript that manipulates pixel data. The channel values are directly meaningful — if you want a lighter version, you increase all three values proportionally.
HSL is the most human-friendly of the three. Hue (the color itself, as an angle on a color wheel, 0–360), Saturation (how vivid versus grey, 0–100%), Lightness (dark to light, 0–100%). Once you understand HSL, you can make smart adjustments without breaking the color family. Want a darker shade of that olive green? Just lower the L value. Want a washed-out pastel version? Drop the S. HSL is the representation to reach for when you're building color scales or doing systematic palette work.
The Math Behind Clicking a Pixel
When you click on the canvas, the tool reads the raw pixel data using the Canvas 2D API's getImageData method. This gives you four values: red, green, blue, and alpha (transparency) — each an integer from 0 to 255. From those three numbers, everything else is derived.
Converting RGB to HEX is simple: each channel becomes a two-character hexadecimal string. Red 61 becomes "3d", green 122 becomes "7a", blue 138 becomes "8a", and you concatenate them with a hash prefix.
RGB to HSL is more involved. You normalize all three channels to a 0–1 range, find the maximum and minimum channel values, and use those to compute lightness (average of max and min), saturation (delta of max and min, scaled by a formula that accounts for lightness), and hue (an angle derived from which channel is dominant and the ratio between the other two). The edge cases — black, white, and pure greys where saturation is zero — need special handling so you don't end up with undefined hue values. The tool handles all of these correctly.
Cross-Origin Images and the Browser Security Wall
There's something worth knowing if you've ever tried to build this yourself: you can't read pixel data from an image loaded from a different domain, even if it displays just fine on your page. This is called CORS tainting. The moment you draw a cross-origin image onto a canvas and try to call getImageData, the browser throws a security error.
This tool sidesteps the problem entirely by working only with images you upload directly from your device. The file is read using a local object URL — it never touches a server, never makes a network request, and the canvas is never tainted. Your image data stays in your browser's memory and disappears when you close the tab or reset the tool.
What Belongs in a Design Palette — And How to Build One
Professional designers don't usually work with a single extracted color. They build systems. A typical product palette might have a primary color in five or six lightness stops, a neutral gray scale, an accent color for interactive elements, and semantic colors for success, warning, and error states.
The color picker is most useful at the front end of this process: you extract the key colors from a reference image — the dominant background tone, the main accent, the text color, a secondary element — and use those as seeds. From each seed, you can generate a full scale by adjusting HSL lightness in even increments. A seed at hsl(201, 38%, 39%) might spawn a scale from hsl(201, 38%, 95%) all the way down to hsl(201, 38%, 10%).
The built-in palette feature in this tool saves each clicked color as you work, so you can build up a collection from multiple clicks across an image before you start building your scale. Hover any saved swatch to review its HEX value, then click it to reload the full HEX/RGB/HSL values into the result panel.
Photography vs. UI Screenshots: Two Very Different Sources
When you pick colors from a photograph versus a UI screenshot, you get very different kinds of raw material.
Photographs are continuous. A "blue sky" in a photo isn't one color — it's thousands of slightly different pixels, shifting from deeper blue near the zenith to warmer, lighter tones near the horizon. If you click around the sky in a photo, you'll notice every click returns a different value. This is useful when you want naturalistic color — you can pick several samples and average them mentally, or choose the one that reads as most representative.
UI screenshots are more predictable. Buttons are flat fills. Backgrounds are usually a single value. Text is the exact color the designer specified. When you're reverse-engineering a competitor's design or studying a UI system you admire, screenshots give you precise extractions because those colors were chosen deliberately and applied uniformly.
Practical Use Cases Beyond the Obvious
The obvious use is matching colors from reference images for design work. But there are other situations where this gets genuinely useful.
Brand consistency auditing is one. If you have a collection of brand assets — logos, product photos, campaign images — you can sample colors across them to verify whether the printed blue and the digital blue actually match, or have drifted over time through different production processes.
Accessibility evaluation is another. Once you have the exact RGB values of a text color and its background, you can calculate the WCAG contrast ratio manually (using the relative luminance formula) and know definitively whether the combination passes AA or AAA requirements. No more guessing whether the dark gray text on the light gray background is borderline or comfortably within spec.
And then there's texture and material design. If you're designing a UI that mimics physical materials — stone, leather, matte metal — sampling from actual photographs of those materials gives you a grounding that purely speculative color choices don't have. The resulting palette feels authentic because it is.
When the Picked Color Doesn't Look Right
Sometimes you click what looks like a pure red in an image and get back something unexpected, like #c84a3b instead of #ff0000. This happens because almost nothing in a real image is a fully saturated primary color. Photographs go through camera sensors, JPEG compression, color grading, and monitor color profiles before they reach your screen. Even stock vector illustrations often have subtly off-primary fills because they were designed on a screen that wasn't calibrated to sRGB.
The picker reports what's actually there in the image file's pixel data — which is the truthful answer. If you need a pure red and the source material only approximates it, you'll need to make a design decision: use the extracted value for authenticity, or adjust it to the nearest pure hue for clarity. That's a judgment call the tool correctly leaves to you.