How to Find the Color Code of Anything in an Image

Pull the color from a photo you like as an exact code, and you can use exactly the same color again in your logo, website or next design.

6 min read · Updated 2026-10-06

Why record a code instead of matching "by eye"?

Every monitor and device is calibrated differently, so the same color looks slightly different on each screen. If you pick "about this color" by eye, it may look different later on another screen or in print. Number codes like HEX, RGB and HSL, on the other hand, reproduce exactly the same color wherever you enter them. That is why it's a good idea to record your brand colors and the background colors you use often as codes.

Advertisement (guide-mid)

Understanding the three code formats

How to pick a color from a photo

  1. Upload the photo to the Color Picker from Image.
  2. Hover over the photo to see the color in real time, and click the spot you want to lock and copy the color.
  3. To see the main colors of the photo at a glance, use automatic extraction to pull 5 to 8 colors.
  4. Write the HEX codes you picked in a note or your design file.
  5. To see the color in other formats (RGB, HSL), enter the HEX code in the converter and the others update automatically.

Tips for picking accurately

Even the same object in a photo has slightly different colors in different places because of lighting and shadows. Picking from the flattest part, without shadows and with less shine, gets you closer to the "pure" color. If you need the exact brand color of a logo or product, picking from a less-compressed PNG original is more accurate than a JPG, because JPG can shift colors very slightly when it saves.

Where to use the colors you pick

You can paste a HEX code straight into a CSS background color or a design tool's color field. If you need a lighter or darker color in the same family, convert it to HSL and change only the L (lightness) value to keep the same hue while changing the brightness. Once you have chosen background and text colors, always check their contrast ratio with the contrast checker in the color picker. Even beautiful colors are hard to read if the difference in brightness is too small.

Good vs. bad examples

Common mistakes

For an important brand color, don't pick just once. Pick from 2 or 3 spots in the same area of the photo, compare them and then decide on a representative value for better accuracy.

Checklist

FAQ

Do I have to include the # in front of a HEX code?

CSS and most design tools only recognize the code correctly with the #. We recommend recording it with the #, like #FF5A36.

Can JPG compression change the color slightly?

Yes. JPG can change colors very slightly when it compresses. If the exact brand color matters, picking from the original design file or a lossless format (PNG) is more accurate.

I get different codes for what looks like the same color in one photo. Why?

Because of lighting, shadows and compression, pixel colors vary slightly from spot to spot even on the same object. Something that looks like one color is often several similar colors. The main-color extraction groups similar colors into one.

Colors look different on every monitor. What can I do?

That's right: the same code can look slightly different depending on how a monitor is calibrated. That is exactly why recording the code (the numbers) and entering it in other tools is far more accurate than matching by eye.

Try it now

Advertisement (guide-end)