{"id":139,"date":"2020-08-18T14:30:57","date_gmt":"2020-08-18T14:30:57","guid":{"rendered":"http:\/\/half4.xyz\/?p=139"},"modified":"2024-01-25T10:15:33","modified_gmt":"2024-01-25T10:15:33","slug":"part-1-theory-what-makes-skin-color","status":"publish","type":"post","link":"https:\/\/half4.xyz\/index.php\/2020\/08\/18\/part-1-theory-what-makes-skin-color\/","title":{"rendered":"Part 1 (Theory): What Makes Skin Color?"},"content":{"rendered":"<h2 class=\"wp-block-heading\">Chromophores<\/h2>\n<p>A chromophore is the part of any molecule that gives that molecule its color. It gives color by absorbing different wavelengths of light and reflecting others.<\/p>\n<p>An examples of a chromophore you may be familiar with is chlorophyll. It exists inside plants, reflecting green light, to give the plant its green-colored leaves. It absorbs the other colors of light to create energy through the process of photosynthesis.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/a\/a3\/Why_are_plants_green.svg\/1920px-Why_are_plants_green.svg.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Such chromophores also exist in your skin. The one you are probably most familiar with is melanin, which creates darker skin in higher concentrations.<\/p>\n<p>In the skin, melanin comes in two types: <em>eumelnain <\/em>and <em>pheomelanin<\/em>. Eumelanin is the most abundant of the two types, and is largely responsible for making skin darker, giving it a more brown or black tone. Pheomelanin causes a reddening of the skin and is found in lower concentrations.<\/p>\n<p>An interesting thing to note is that skin can have differing ratios of these types. The blend of these two chromophores is what tends to give us the variance in black skin in different ethnicities, such as across Africa and the Middle East.<\/p>\n<p>There is one more chromophore that greatly affects skin color: <em>hemoglobin<\/em>. This is responsible for the redness of skin. It is the reason that shining a bright light through a fingertip causes the fingertip to look red. It is what causes blushing. Hemoglobin has a significant impact on final skin tone, and especially with lighter skin colors, as less red light gets absorbed by the melanin.<\/p>\n<p>Going forward, we\u2019ll occasionally refer to each of these chromophores with the following notation (particularly in formulae):<\/p>\n<p>C<sub>m<\/sub> = \u201cMelanin Fraction\u201d, or, \u201cthe amount of melanin in the skin\u201d<br \/>\n\u03b2<sub>m<\/sub> = \u201cMelanin Blend\u201d, or, \u201cwhat is the proportion of emuelanin to phemelanin?\u201d<br \/>\nC<sub>h<\/sub> = \u201cHemoglobin Fraction\u201d, or, \u201cthe amount of hemoglobin in the skin\u201d<\/p>\n<p>&nbsp;<\/p>\n<p>We will sometimes further split the hemoglobin fraction up, as there is differing levels of hemoglobin in different layers of the skin. C<sub>he<\/sub> refers to the hemoglobin fraction in the epidermis, C<sub>hd<\/sub> is for the dermis. More on this later!<\/p>\n<h2 class=\"wp-block-heading\">Absorption, Reflection, Scattering<\/h2>\n<p>We can\u2019t proceed any further without a solid understanding on what makes color, more generally.<\/p>\n<p>The human sees visible wavelengths of light. These wavelengths range from approximate 380nm to 780nm:<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/d\/d9\/Linear_visible_spectrum.svg\/2560px-Linear_visible_spectrum.svg.png\" alt=\"\" \/><figcaption>Figure 2: Wavelength of the visible spectrum is at the top, on the x-axis.<\/figcaption><\/figure>\n<p>We tend to categorize light into boxes, such as \u201cred\u201d, \u201cyellow\u201d, \u201cgreen\u201d, etc., but this is not strictly correct. These categorizations are crafted by humans to broadly describe the colour of an object, but they don\u2019t work when we want to describe what is actually happening to the light.<\/p>\n<p>If an object appears red, that is because it absorbs all, or most, of the wavelengths of light <em>outside<\/em> of the red wavelengths (&lt;570nm), and reflects the red values back away and into our eyes.<\/p>\n<p>We can therefore describe a color in a more <em>factual<\/em> way by plotting which wavelengths it absorbs. We can visualize this as a graph. Here is such as graph for two types of chlorophyll:<br \/>\n<img decoding=\"async\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/f\/f6\/Chlorophyll_Absorption_Spectrum.svg\/1920px-Chlorophyll_Absorption_Spectrum.svg.png\" alt=\"\" \/><\/p>\n<p>We know that chlorophyll is green, and the graph supports this. We can see that it absorbs blue and red values, leaving green wavelengths reflected towards our eyes.<\/p>\n<p>The problem we have is that this absorption graph is not telling us <em>how much<\/em> green gets reflected back into our eyes. This is because the green wavelengths may bounce back out the tissue, or simply pass straight through it. It is this reflected information that gives us the <em><span style=\"text-decoration: underline;\">color<\/span><\/em> of the object, so we need to be able to calculate it.<\/p>\n<p>To figure out how to get the reflectance values, we need to understand exactly how light behaves inside an object such as a chloroplast or in the skin.<\/p>\n<p>As a light photon hits a chromophore, if the wavelength is absorbed by the chromophore, the photon \u2018dies\u2019 (as far as we are concerned). If it is not absorbed it is reflected back out.<\/p>\n<p>The complexity arises in that the photons hit <em>things<\/em> within the structure of the medium it is travelling. It causes the photons to bounce and scatter. As they do so, they lose energy. Others may reflect back out the medium, but in a direction that never reaches our eyes. We therefore need to model this behavior programatically in order to obtain correct reflectance values.<\/p>\n<h2><\/h2>\n<h2 class=\"wp-block-heading\">The Structure of Skin<\/h2>\n<p>Before we can start getting into simulating this phenomenon, we need to look at the physical structure of the skin.<\/p>\n<p>The skin has two primary layers (at least as far as we care about for skin color): the epidermis and the dermis. The epidermis is the upper layers of skin and predominantly contain our melanin. The dermis refers to the remaining skin below this depth and mainly contributes color through hemoglobin.<\/p>\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/half4.xyz\/wp-content\/uploads\/2020\/05\/image-3.png\" alt=\"\" \/><figcaption>Figure 5 (Donner et al. [2008])<\/figcaption><\/figure>\n<p>The dermis also has slight absorption from what we call the \u201cbaseline\u201d. This is essentially \u201ceverything else that isn\u2019t hemoglobin\u201d.<\/p>\n<p>Handily, Donner et al. [2008] provides an illustration for this baseline and other chromophores:<\/p>\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-184\" src=\"https:\/\/half4.xyz\/wp-content\/uploads\/2020\/07\/image-4.png\" sizes=\"(max-width: 435px) 100vw, 435px\" srcset=\"https:\/\/half4.xyz\/wp-content\/uploads\/2020\/07\/image-4.png 435w, https:\/\/half4.xyz\/wp-content\/uploads\/2020\/07\/image-4-300x226.png 300w\" alt=\"\" width=\"435\" height=\"327\" \/><figcaption>Figure 6 (Donner et al. [2008])<\/figcaption><\/figure>\n<p>We have quite a few factors contributing to absorption, we now need to get this graph data itself (so we can use it in our simulation) and we need to factor in skin layers.<\/p>\n<h2 class=\"wp-block-heading\">The Math<\/h2>\n<p>Donner et al [2008] helpfully provide how they calculated their absorption and scattering coefficients that they used in their model to generate skin tones<\/p>\n<p><strong>Melanin<\/strong><\/p>\n<p>As you can see in the graph above, both melanin types have a fairly smooth curve. These are easy to generate by using a simple power curve.<\/p>\n<p>\u03c3<sup>em<\/sup><sub>a<\/sub>(\u03bb) = 6.6 x 10<sup>10<\/sup> x \u03bb<sup>-3.33<\/sup> mm<sup>-1<\/sup><\/p>\n<p>Where \u03c3<sup>em<\/sup><sub>a<\/sub> is the eumelanin absorption coefficient, \u03c3<sup>pm<\/sup><sub>a<\/sub> is the pheomelanin absorption coefficient and \u03bb is the wavelength of light<\/p>\n<p>If this is the first time reading this sort of notation, the way we use these numbers is to replace \u201c\u03bb\u201d with a wavelength. For example, to calculate the eumelanin absorption coefficient for 400nm we do:<\/p>\n<p>\u03c3<sup>em<\/sup><sub>a<\/sub>(400) = 6.6 x 10<sup>10<\/sup> x 400<sup>-3.33<\/sup><\/p>\n<p>Where \u201c<em>\u03c3<sup>em<\/sup><sub>a<\/sub>(400)<\/em>\u201d is what we\u2019re trying to calculate.<\/p>\n<p>\u03c3<sup>em<\/sup><sub>a<\/sub>(400) = 142.786 mm<sup>-1<\/sup><\/p>\n<p>The next to consider is the baseline. When constructing this series, I found Donner et al. [2008]\u2019s baseline to be significantly out of recorded spectral data (we\u2019ll find out how to debug these sorts of things later). I found the following closely matched the baseline absorption of skin:<\/p>\n<p>\u03c3<sup>baseline<\/sup><sub>a<\/sub>(\u03bb) = 0.0244 + 8.54e<sup>-(\u03bb-200)\/123<\/sup> mm<sup>-1<\/sup><\/p>\n<div class=\"wp-block-spacer\" style=\"height: 20px;\" aria-hidden=\"true\"><\/div>\n<p>We can now construct a formula for our overall epidermal absorption:<\/p>\n<p>\u03c3<sup>epidermis<\/sup><sub>a<\/sub>(\u03bb) = C<sub>m<\/sub>(\u03b2<sub>m<\/sub>\u03c3<sup>em<\/sup><sub>a<\/sub>(\u03bb) + (1-\u03b2<sub>m<\/sub>)\u03c3<sup>em<\/sup><sub>a<\/sub>(\u03bb))+(1-C<sub>he<\/sub>)\u03c3<sup>baseline<\/sup><sub>a<\/sub>(\u03bb)<\/p>\n<p><strong>Hemoglobin<\/strong><\/p>\n<p>In Figure 5, you can see we have two lines for hemoglobin \u2013 oxygenated and deoxygenated. They have difference absorption spectra and are more complex. For these, we will manually extract the data rather than generate it.<\/p>\n<p>We\u2019ll refer to oxygenated hemoglobin absorption coefficient as \u03c3<sup>oxy<\/sup><sub>a<\/sub> and its deoxgenated counterpart as \u03c3<sup>deoxy<\/sup><sub>a<\/sub><\/p>\n<p>Once we have that data, we can use it to generate the dermis absorption coefficients:<\/p>\n<p>\u03c3<sup>dermis<\/sup><sub>a<\/sub>(\u03bb) = C<sub>hd<\/sub>(\u03b3\u03c3<sup>oxy<\/sup><sub>a<\/sub>(\u03bb) + (1-\u03b3)\u03c3<sup>deoxy<\/sup><sub>a<\/sub>(\u03bb))+(1-C<sub>m<\/sub>)\u03c3<sup>baseline<\/sup><sub>a<\/sub>(\u03bb)<\/p>\n<p>You\u2019ll notice we have a new character \u2013 \u03b3. This is the ratio between oxygenated and deoxygenated hemoglobin.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Scattering<\/strong><\/p>\n<p>The final equation we need is to calculate the scattering of light in the surface.<\/p>\n<p>For our model, we\u2019ll use the following for the epidermis:<\/p>\n<p>\u03c3<sup>epi<\/sup><sub>s<\/sub>(\u03bb) = 14.74\u03bb<sup>-0.22<\/sup> + 2.2 x 10<sup>11<\/sup> x \u03bb<sup>-4<\/sup><\/p>\n<div class=\"wp-block-spacer\" style=\"height: 20px;\" aria-hidden=\"true\"><\/div>\n<p>For the dermis, we will reduce this by half as the skin is more translucent [Donner et al, 2008]. So:<\/p>\n<p>\u03c3<sup>derm<\/sup><sub>s<\/sub>(\u03bb) = 0.5 x 14.74\u03bb<sup>-0.22<\/sup> + 2.2 x 10<sup>11<\/sup> x \u03bb<sup>-4<\/sup><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Final Modelling Notes<\/strong><\/p>\n<p>We will fix the epidermis depth to 0.25mm. We don\u2019t want the skin too thick as the melanin contributions can be large.<\/p>\n<p>We also assume a constant index of refraction of 1.4, as this is a close approximation for skin.<\/p>\n<p>Now to move on to the implementation:<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Chromophores A chromophore is the part of any molecule that gives that molecule its color. It gives color by absorbing different wavelengths of light and reflecting others. An examples of a chromophore you may be familiar with is chlorophyll. It exists inside plants, reflecting green light, to give the plant its green-colored leaves. It absorbs the other colors of light to create energy through the process of photosynthesis. &nbsp; Such chromophores also exist in your skin. The one you are probably most familiar with is melanin, which creates darker skin in higher concentrations. In the skin, melanin comes in two types: eumelnain and pheomelanin. Eumelanin is the most abundant of the two types, and is largely responsible for making skin darker, giving it a more brown or black tone. Pheomelanin causes a reddening of the skin and is found in lower concentrations. An interesting thing to note is that skin can have differing ratios of these types. The blend of these two chromophores is what tends to give us the variance in black skin in different ethnicities, such as across Africa and the Middle East. There is one more chromophore that greatly affects skin color: hemoglobin. This is responsible for the redness of skin. It is the reason that shining a bright light through a fingertip causes the fingertip to look red. It is what causes blushing. Hemoglobin has a significant impact on final skin tone, and especially with lighter skin colors, as less red light gets absorbed by the melanin. Going forward, we\u2019ll occasionally refer to each of these chromophores with the following notation (particularly in formulae): Cm = \u201cMelanin Fraction\u201d, or, \u201cthe amount of melanin in the skin\u201d \u03b2m = \u201cMelanin Blend\u201d, or, \u201cwhat is the proportion of emuelanin to phemelanin?\u201d Ch = \u201cHemoglobin Fraction\u201d, or, \u201cthe amount of hemoglobin in the skin\u201d &nbsp; We will sometimes further split the hemoglobin fraction up, as there is differing levels of hemoglobin in different layers of the skin. Che refers to the hemoglobin fraction in the epidermis, Chd is for the dermis. More on this later! Absorption, Reflection, Scattering We can\u2019t proceed any further without a solid understanding on what makes color, more generally. The human sees visible wavelengths of light. These wavelengths range from approximate 380nm to 780nm: Figure 2: Wavelength of the visible spectrum is at the top, on the x-axis. We tend to categorize light into boxes, such as \u201cred\u201d, \u201cyellow\u201d, \u201cgreen\u201d, etc., but this is not strictly correct. These categorizations are crafted by humans to broadly describe the colour of an object, but they don\u2019t work when we want to describe what is actually happening to the light. If an object appears red, that is because it absorbs all, or most, of the wavelengths of light outside of the red wavelengths (&lt;570nm), and reflects the red values back away and into our eyes. We can therefore describe a color in a more factual way by plotting which wavelengths it absorbs. We can visualize this as a graph. Here is such as graph for two types of chlorophyll: We know that chlorophyll is green, and the graph supports this. We can see that it absorbs blue and red values, leaving green wavelengths reflected towards our eyes. The problem we have is that this absorption graph is not telling us how much green gets reflected back into our eyes. This is because the green wavelengths may bounce back out the tissue, or simply pass straight through it. It is this reflected information that gives us the color of the object, so we need to be able to calculate it. To figure out how to get the reflectance values, we need to understand exactly how light behaves inside an object such as a chloroplast or in the skin. As a light photon hits a chromophore, if the wavelength is absorbed by the chromophore, the photon \u2018dies\u2019 (as far as we are concerned). If it is not absorbed it is reflected back out. The complexity arises in that the photons hit things within the structure of the medium it is travelling. It causes the photons to bounce and scatter. As they do so, they lose energy. Others may reflect back out the medium, but in a direction that never reaches our eyes. We therefore need to model this behavior programatically in order to obtain correct reflectance values. The Structure of Skin Before we can start getting into simulating this phenomenon, we need to look at the physical structure of the skin. The skin has two primary layers (at least as far as we care about for skin color): the epidermis and the dermis. The epidermis is the upper layers of skin and predominantly contain our melanin. The dermis refers to the remaining skin below this depth and mainly contributes color through hemoglobin. Figure 5 (Donner et al. [2008]) The dermis also has slight absorption from what we call the \u201cbaseline\u201d. This is essentially \u201ceverything else that isn\u2019t hemoglobin\u201d. Handily, Donner et al. [2008] provides an illustration for this baseline and other chromophores: Figure 6 (Donner et al. [2008]) We have quite a few factors contributing to absorption, we now need to get this graph data itself (so we can use it in our simulation) and we need to factor in skin layers. The Math Donner et al [2008] helpfully provide how they calculated their absorption and scattering coefficients that they used in their model to generate skin tones Melanin As you can see in the graph above, both melanin types have a fairly smooth curve. These are easy to generate by using a simple power curve. \u03c3ema(\u03bb) = 6.6 x 1010 x \u03bb-3.33 mm-1 Where \u03c3ema is the eumelanin absorption coefficient, \u03c3pma is the pheomelanin absorption coefficient and \u03bb is the wavelength of light If this is the first time reading this sort of notation, the way we use these numbers is to replace \u201c\u03bb\u201d with a wavelength. For example, to calculate the eumelanin absorption coefficient for 400nm we<\/p>\n","protected":false},"author":1,"featured_media":125,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[8,7],"class_list":["post-139","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-lut","tag-skin"],"_links":{"self":[{"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/posts\/139"}],"collection":[{"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=139"}],"version-history":[{"count":43,"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions"}],"predecessor-version":[{"id":1279,"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/posts\/139\/revisions\/1279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/media\/125"}],"wp:attachment":[{"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/half4.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}