How to Find the Color Code of Any Image
Updated · 3 min read
You have a picture - a logo, a product photo, a screenshot of a website - and you need the exact color code of one part of it. Guessing by eye almost never works: two blues that look identical can be dozens of values apart. Here is how to get the precise HEX or RGB code in under a minute.
Method 1: an online image color picker (fastest)
- Open the Image Color Picker.
- Drop your image onto the page, click to browse, or simply paste a screenshot with Ctrl+V (⌘+V on a Mac).
- Move your pointer over the image. A magnifying loupe shows the individual pixels, so you can aim at exactly the spot you want.
- Click. The code appears in HEX (
#5B4BFF), RGB (rgb(91, 75, 255)), HSL, HSV and CMYK. Click any value to copy it.
The image is processed inside your browser and is never uploaded, so this is safe for confidential designs and screenshots.
Method 2: get all the main colors at once
If you need the overall color scheme rather than one pixel - for example, to build a website theme from a logo - use Palette from Image. It groups similar pixels and returns the 3-12 dominant colors with their share of the image, ready to export as CSS variables, Tailwind config or JSON.
Method 3: tools you may already have
- Photoshop, GIMP, Affinity: press I for the eyedropper, click, then open the foreground color to read the HEX code.
- Figma: select a shape, open the fill color and press I to pick from anywhere on the canvas.
- Windows: Microsoft PowerToys includes a Color Picker that works anywhere on screen (Win+Shift+C).
- macOS: the built-in Digital Color Meter app (Applications → Utilities) shows the color under the cursor.
More options, including phones, are in how to pick a color from your screen.
Why the code you get may look “wrong”
Photos are noisy
A red car in a photo is not one red. It is thousands of slightly different pixels because of lighting, sensor noise and reflections. If you click one pixel you get that pixel, which may be a little lighter or darker than the color you perceive. Switch the picker's Sample setting to 3×3 or 5×5 to average the surrounding area and get a more representative value.
JPEG compression changes edges
JPEG files blur colors along sharp edges, so text and thin lines are surrounded by in-between shades. Pick from the middle of a solid area, not from the edge. If you have the original PNG or SVG of a logo, use that instead.
Screens and color profiles
Most images on the web are sRGB, and the picker reads the stored pixel values. An image saved with a wide-gamut profile (such as Display P3 from a recent iPhone) can produce slightly different numbers depending on how it is converted. For brand work, always confirm colors against the official brand guidelines.
HEX, RGB or HSL - which code should you copy?
All three describe the same color. Use HEX for CSS and most design tools, RGB when you need transparency (rgb(91 75 255 / 50%)), and HSL when you want to tweak a color by hand, for example to make a darker hover state. Read the full comparison in HEX vs RGB vs HSL, or convert any code with the color converter.
Quick answers
Can I find the color code of an image on my phone?
Yes. Open the image color picker in your phone's browser, tap “Choose image” and pick a photo or screenshot. Drag your finger to aim, then release to pick.
How do I find the color of a website element?
Take a screenshot and paste it into the picker, or use your browser's developer tools to read the CSS value directly.
Is the color code from a picture the same as the brand's official color?
Usually close, but not guaranteed. Compression and color profiles can shift values slightly, so check official guidelines for brand work. See our brand colors list.