<p>Yes, I think you're right. The values from a typical color picker would be in a gamma encoding or sRGB encoding and would need to be converted to linear to use as reflectance. This is probably just a mistake in the book.</p>
<p>(BTW, in case you're not aware, sRGB isn't actually gamma 2.2 but <a href="https://en.wikipedia.org/wiki/SRGB#Specification_of_the_transformation" rel="nofollow noreferrer">a more complicated transfer function</a>.)</p>

CC BY-SA 4.0
2020-12-04T19:19:50.897Z
2020-12-04T19:19:50.897Z
Nathan Reed
<p>I am trying to derive the material reflectance values from a color picker tool(say MS Paint).
My understanding is to first gamma decode(raise to the power of 2.2) the RGB values from the color picker, so to bring it back to linear space, and then use it in Radiance mat definition.</p>
<p>However in the <a href="https://floyd.lbl.gov/radiance/book/" rel="nofollow noreferrer">“Rendering with Radiance” book by Greg Ward</a> section 5.1.4 &quot;Estimating Surface Color&quot;</p>
<p><a href="https://ibb.co/mcxVZVn" rel="nofollow noreferrer">page 294</a> and <a href="https://ibb.co/ZWZZzCB" rel="nofollow noreferrer">page 295</a>, the rgb values from the color picker are raised to the power of inverse of gamma (1/2.2) and then used as in the material definition.</p>
<p>Here is a cropped snapshot of the formula from the above links to the scan copied of the two pages.</p>
<p><a href="https://i.sstatic.net/wfxSJ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wfxSJ.png" alt="enter image description here" /></a></p>
<p>My question is, should the sRGB values from the color picker not be raised to the power of 2.2(decoding) rather than 1/2.2(encoding)?</p>
<p>For example for BS4800 “18-B-25 Dark admiralty grey / Merlin” colour sample, <a href="https://www.e-paint.co.uk/Lab_values.asp" rel="nofollow noreferrer">this webpage</a> shows sRGB=104,112,116 and LRV value as approx. 16%. This matches closely to my understanding of (112/256) ^ 2.2 = 0.16 (just for the green component).</p>
<p><a href="https://i.sstatic.net/ToXyh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ToXyh.png" alt="enter image description here" /></a></p>

<reflection><material><gamma>
Converting from RGB Color Picker to Surface Reflectance
ali
# Converting from RGB Color Picker to Surface Reflectance

(Asked by: username_0 on 2020-12-04)

I am trying to derive the material reflectance values from a color picker tool(say MS Paint).
My understanding is to first gamma decode(raise to the power of 2.2) the RGB values from the color picker, so to bring it back to linear space, and then use it in Radiance mat definition.

However in the [“Rendering with Radiance” book by Greg Ward](https://floyd.lbl.gov/radiance/book/) section 5.1.4 "Estimating Surface Color"

[page 294](https://ibb.co/mcxVZVn) and [page 295](https://ibb.co/ZWZZzCB), the rgb values from the color picker are raised to the power of inverse of gamma (1/2.2) and then used as in the material definition.

Here is a cropped snapshot of the formula from the above links to the scan copied of the two pages.

[![enter image description here](https://i.sstatic.net/wfxSJ.png)](https://i.sstatic.net/wfxSJ.png)

My question is, should the sRGB values from the color picker not be raised to the power of 2.2(decoding) rather than 1/2.2(encoding)?

For example for BS4800 “18-B-25 Dark admiralty grey / Merlin” colour sample, [this webpage](https://www.e-paint.co.uk/Lab_values.asp) shows sRGB=104,112,116 and LRV value as approx. 16%. This matches closely to my understanding of (112/256) ^ 2.2 = 0.16 (just for the green component).

[![enter image description here](https://i.sstatic.net/ToXyh.png)](https://i.sstatic.net/ToXyh.png)

**Tags:** reflection, material, gamma


---

## 1 answers

### Answer by username_1 on 2020-12-04. Score: 1 | Accepted answer

Yes, I think you're right. The values from a typical color picker would be in a gamma encoding or sRGB encoding and would need to be converted to linear to use as reflectance. This is probably just a mistake in the book.

(BTW, in case you're not aware, sRGB isn't actually gamma 2.2 but [a more complicated transfer function](https://en.wikipedia.org/wiki/SRGB#Specification_of_the_transformation).)


---

