What Colors Are We? Constructing A Color Space For Skin Tones
What Colors Are We? Constructing A Good Enough Color Space For Skin Tones
If you're just looking for the results, below is a custom color picker based on the color space written<br>in Javascript and a sample procedural generation algorithm in Python (Javascript equivalents are in the<br>page source) - feel free to take this math and go have fun depicting our diverse world!
The goal of this project was to define a color space that makes it easier to build inclusive<br>color tools for a variety of contexts - such as character creators or digital art. If you see something<br>here that sparks your curiosity, I would love for you to stick around and read below this section to<br>learn more!
R² =
(What's R²?)
Show Sphere
What is each direction on the picker adjusting? Jump to that explanation<br>here.
# Plug the output of one of the select_point implementations into to_rgb(t, u, v)
def select_point(r_square: float = 2.) -> tuple[float, float, float]:<br>"""Uniformly sample from the sphere deterministically"""<br>radius = r_square ** (1. / 2)
phi = uniform(0, 2 * math.pi)<br>costheta = uniform(-1, 1)<br>n = uniform(0, 1)
theta = math.acos(costheta)<br>r = radius * (n ** (1.0 / 3))
t = r * math.sin(theta) * math.cos(phi)<br>u = r * math.sin(theta) * math.sin(phi)<br>v = r * math.cos(theta)
return (t, u, v)
def select_point(r_square: float = 2.) -> tuple[float, float, float]:<br>"""Uniformly sample from the sphere using rejection sampling"""<br>radius = r_square ** (1. / 2)<br>R = radius + 1
while R > radius:<br>t = uniform(-radius, radius)<br>u = uniform(-radius, radius)<br>v = uniform(-radius, radius)
R = (t**2 + u**2 + v**2) ** (1.0 / 2)
return (t, u, v)
def to_rgb(t, u, v) -> tuple[int, int, int]:<br>x = (t - 0.15) / 0.45<br>y = (v - 1.2 * t ** 2 + 0.2 * t + 0.655) / 1.84<br>z = u / 3.6
r = 28.77438370854 * x + 36.78307445559 * y - 19.69766918644 * z + 187.1436241611<br>g = 35.38327306318 * x - 2.009931981182 * y + 47.93462563172 * z + 137.1073825503<br>b = 36.14733717939 * x - 43.54346996173 * y - 28.50821294135 * z + 108.2241610738
return int(r), int(g), int(b)
Overview
What colors are we? The short answer is maybe something like “brown” and the long answer is very,<br>very long. Representing the broad range of human skin tones digitally is a hard problem.<br>Oftentimes, a limited set of colors is presented as being good enough to represent the full spectrum of<br>diversity. However, in selecting a limited set of colors, large groups of people are unable to<br>accurately be represented, or might be unintentionally excluded.
The goal of this work is to identify the broadest inclusive range of colors in the RGB color space that<br>correspond to plausible, but simplified skin tones. In particular, the aim was to identify simple, “good<br>enough” equations which define that area, allowing the range to be used in a variety of contexts.<br>Calling the equations "good enough" is intended to keep the limitations of this<br>work at the forefront -<br>the results are a useful starting point, but should not be taken to be authoritative.
Introduction
Although there have been improvements in the set of colors that are presented as representative of us,<br>there's still a gap that needs to be closed. Emojis say we're 5 shades (or cartoon-yellow); a makeup<br>brand might say 50; and the color picker on a character creator might shrug and tell you to pick from<br>every color. If you look outside - or just at yourself - you'll quickly notice that none of those can<br>compare to the variety of reality; one person is not just one color. Despite that, it can be useful to<br>try to boil things down to fewer values. The Unicode Consortium and makeup<br>companies can figure out their own ranges, but I think we can do better than 16777216 options.
Taking the digital art world as an example, images such as the one below are often circulated in an<br>attempt to assist other artists in identifying plausible colors.
"Flesh Cloud" by Tumblr user shiroxix
In the video game world, nowadays the preset colors are often wide ranging and supplemented with a<br>general color picker, but it would be even better if the initial experience presented better options.
Screenshot from character creator for the early access game Paralives
Limitations
Taking a step back to reality, this work has a number of inherent limitations.
As mentioned before, skin tones are much more complicated than a single color. They vary widely between<br>different areas of the body and are subject to complex biological processes. The perceived color of the<br>skin is affected by blood flow, concentrations of melanin, complex scattering of light through the<br>layers of the skin, as well as things like vitiligo, freckles, hyperpigmentation, scarring, and other<br>common variations.
Secondly, a variety of health conditions can cause people to have skin tones that are well outside what<br>might be perceived as plausible. Argyria can often lead to skin that is blue-gray in color; high<br>bilirubin can cause skin to be...