<p>In theory yes, but practically speaking, I doubt it would be very easy. First, the color may not be representable by the color space that your camera of choice produces images in. We've recently started seeing wide color gamut (P3) cameras and displays. There are colors these cameras record and displays produce that fall outside of the sRGB color space that most cameras and displays support. Likewise, there are visible colors that are outside of the P3 color space. So the first hurdle is to have a device which records and stores the colors you're dealing with.</p>

<p>Next you have to do the lighting correction once you get the image into the computer. This is actually not as hard as it sounds. There are products that allow you to do this using a system similar to what you describe. <a href="https://www.youtube.com/watch?v=1fcve4Dp1lo&amp;feature=youtu.be" rel="nofollow noreferrer">Here's a video</a> for one that works with video rather than stills.</p>

<p>Once you've done all that, you need some way of translating that color from some RGB space into something that your local paint store can understand. I'm not sure how to do that. Most paint store employees are not trained in color science and have to use a limited toolset provided by the paint companies.</p>

<p>Is there any way you could get a small, inconspicuous piece of the actual object? Most paint stores have a machine that will take a physical object and create a paint that's a fairly close match to that object. Whether their matches are close enough for your needs is something you'd have to determine. I've used them before and found that while they get very close, I'm still able to see the difference between the original and the new paint, unless I can paint up to corners.</p>

CC BY-SA 4.0
2018-06-03T17:03:06.140Z
2018-06-03T17:03:06.140Z
user1118321
<p>I ran into this problem while trying to find the paint color of the doors in my house: is it in principe possible to automatically determine the paint color from a photo?</p>

<p>Different types of colour standards (such as RAL, <a href="https://en.wikipedia.org/wiki/List_of_RAL_colors" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/List_of_RAL_colors</a>) mention RGB values, but of course lighting conditions, material, camera and probably other factors highly affect the RGB value that is measured.</p>

<p>Does a solution to this problem already exist?</p>

<p>An idea I had is to hold an official color reference chart in the photo next to the target object (e.g. my door), so the transformation due to lighting conditions and camera between the known RGB values of the colors on the reference chart and those in the photo could somehow be established. Then the inverse transformation could be applied to the color of the target object and the closest matching paint color could be found.</p>

<p>Could this idea work and if so, what kind of transformation between reference and measurement could be expected?</p>

<color><color-science>
Determine paint color from a photo
dndr
# Determine paint color from a photo

(Asked by: username_0 on 2018-06-03)

I ran into this problem while trying to find the paint color of the doors in my house: is it in principe possible to automatically determine the paint color from a photo?

Different types of colour standards (such as RAL, <https://en.wikipedia.org/wiki/List_of_RAL_colors>) mention RGB values, but of course lighting conditions, material, camera and probably other factors highly affect the RGB value that is measured.

Does a solution to this problem already exist?

An idea I had is to hold an official color reference chart in the photo next to the target object (e.g. my door), so the transformation due to lighting conditions and camera between the known RGB values of the colors on the reference chart and those in the photo could somehow be established. Then the inverse transformation could be applied to the color of the target object and the closest matching paint color could be found.

Could this idea work and if so, what kind of transformation between reference and measurement could be expected?

**Tags:** color, color-science


---

## 1 answers

### Answer by username_1 on 2018-06-03. Score: 1 | Accepted answer

In theory yes, but practically speaking, I doubt it would be very easy. First, the color may not be representable by the color space that your camera of choice produces images in. We've recently started seeing wide color gamut (P3) cameras and displays. There are colors these cameras record and displays produce that fall outside of the sRGB color space that most cameras and displays support. Likewise, there are visible colors that are outside of the P3 color space. So the first hurdle is to have a device which records and stores the colors you're dealing with.

Next you have to do the lighting correction once you get the image into the computer. This is actually not as hard as it sounds. There are products that allow you to do this using a system similar to what you describe. [Here's a video](https://www.youtube.com/watch?v=1fcve4Dp1lo&feature=youtu.be) for one that works with video rather than stills.

Once you've done all that, you need some way of translating that color from some RGB space into something that your local paint store can understand. I'm not sure how to do that. Most paint store employees are not trained in color science and have to use a limited toolset provided by the paint companies.

Is there any way you could get a small, inconspicuous piece of the actual object? Most paint stores have a machine that will take a physical object and create a paint that's a fairly close match to that object. Whether their matches are close enough for your needs is something you'd have to determine. I've used them before and found that while they get very close, I'm still able to see the difference between the original and the new paint, unless I can paint up to corners.


---

