Lurker News
Hello HN!

I found that picking out plausible but diverse skin tones for my digital art and game development projects was kind of difficult, and I got curious about if there was a way to define a color space that made it easy.
I've built a color picker and procedural generation algorithm based on the space as well as a bunch of other fun js features and demos throughout the page that use the equations. If you find it interesting, I have lots of explanations of how I built it and what properties the space has.
The methodology might be a bit shaky, but hopefully the result is as helpful for others as I have found it! There's lots of room for improvements (see the Future Work section), but I'm really happy with how it turned out.

Comments (99) 54 threads

vermarish2 replies#
This is beautiful work! First, I thought this would involve using PCA to go from 3D to 2D, which would result in an easier selector to use, but at the expense of representing every person.

Then, I thought this would stop at using the U-space vectors (the ones that form the basis of the PCA image) and their corresponding ellipse to form our color space, but no, the function fitting is a very slick idea, even if it was executed by hand.
Lastly, I love the presentation of sampling from different r values. Whether you sample from a fixed r value or a range of r values, I bet this has great applications in game design or animation.
I still don't quite get the manual data labeling process at the beginning? It seems like it would encode some bias, but the consistency of the first point cloud and the results certainly speak for themselves.

automatoney#
Thank you! I call out the manual labeling bias and also that a future work improvement would be to be scientific about that labeling process (multiple labelers, expert labelers), and then to feed that into the equation generation steps. Part of where the "good enough" naming comes from - I was hoping that using my art brain and keeping a bunch of reference images in mind (shout out to the Humanae project) would maybe offset the bias a bit. But 100% right on the bias being there.
dr_scully3 replies#
If you look at my doctoral thesis, in fact skin colour can be parametrised using melanin and haemoglobin concentration; which it means it is indeed (roughly) two dimensional. This allows you to invert the colour of a pixel and identify someone’s chromophore concentration. This is based on previous work of others cited in the thesis.

https://discovery.ucl.ac.uk/id/eprint/10093345/

GolDDranks4 replies#
I've heard that the so-called "yellowish" skin color that non-tanned East Asians tend to have, is due to relative abundance of subcutaneous fat. If that's true, is that captured by the haemoglobin dimension or is it a yet another degree of freedom?
skydhash#
Not an expert, but when I was learning 3d modeling, there was a good chapter on subsurface scattering which affect the human skin rendering. It’s what give it liveness instead of looking like a doll.
Joel_Mckay4 replies#
All skin is slightly translucent, and color/tones forms a gradient across the surface of the skin. Your upper cheeks and forehead are usually slightly reddish, and the chin/neck are slightly bluish.

People only turn yellow if they have kidney or liver damage. However, some distinctive features like Lucy Liu's natural freckles are tough to draw right.
We looked around a lot for a procedural texture/shader to help make the project characters look less sickly, and please also consider supporting the persons work if you are able:
https://kuhantilope.gumroad.com/l/ultimate-skin
Best of luck =3

Continue this thread — 4 replies

dr_scully2 replies#
We used the approximation that the hypodermis was a perfectly white reflector; so the thickness wouldn’t matter. The collagen fibrills scatter light in such a way to create a yellower tint. So a person’s skin might appear this way in the absence of melanin and haemoglobin. I’m not an expert on population statistics, and so cannot give an opinion on specific skin types. Everything was based on ranges.

There is a separate effect of increased bilirubin content, that would appear if someone was ill.

Continue this thread — 2 replies

numpad0#
One thing about East Asian yellow tint in skin is that there really isn't such a thing. Asian base skin color is same as Europeans, if slightly more reddish or slightly more fatty or whatnot, but more or less within margins of error. It's largely an invention from late Age of Discovery era to feed to us-them mentality, with perhaps some effect of malnourishment and sunlight some deep southeast guys was living with at the time of their first contacts.
dTal2 replies#
Oh goody, an expert in a question I've always wanted to ask.

Once upon a time, I encountered a sort of interactive museum book called "Earthsearch". One of its "exhibits" was a color wheel, made of two spinnable pieces of tinted acetate, that purported to be able to generate any skin tone. I suppose this is three degrees of freedom, since for any position of the two wheels you could access a range of colors around the edge - but the printed page underneath was simply a grayscale gradient, so one degree of freedom was simply luminance.
The book was released in 1994, and was very confident. It even went as far as to encourage the reader to see a doctor, should their skin tone not be achievable! What color model were they using?

mhink3 replies#
Oh man, that's a blast from the past, I think I had that book! Was that the one with an aluminum cover?

Continue this thread — 3 replies

dr_scully#
That’s sounds very interesting. I’m not sure. In the thesis, I generated spectral curves and transformed them using the light and camera sensitivity curves. So, in theory it could be used in any color space.

But I can’t vouch for the accuracy of the book, but I suspect it was an approximation.
The haemoglobin and melanin are roughly in separate layers of the skin. There is an approximation known as Beer-Lambert that models the skin as two semi-transparent layers. This ignores subsurface scattering, but is roughly correct.
So, in theory two acetate sheets might replicate this. That’s my intuitive opinion. It has been many years since I did this work.

mdnahas#
Not in dr_scully’s reply is that his thesis says haemoglobin is not static. Blood flow to the skin can vary over time.
s1mon2 replies#
It's always entertaining to try to understand these things from first principles. Color and skin color in particular are very complex things to measure and model. It's not just a physical quantity, it's also a matter of human perception based on lighting and a host of factors.

It seems like some work was done to research existing approaches, but I don't see any reference to Pantone Skin Tones [0]. Without intending to, I've worked on 3 different projects which involved measuring skin tones for makeup applications. The Pantone range is not 100% perfect, but it's pretty well done and easy to understand. There are two axes: a light/dark one, and red-yellow one [1].
[0] https://www.pantone.com/na/en-us/skintone
[1] https://cosmeticsbusiness.com/pantone-skintone-guide-80945

ptmkenny#
There's also the Monk Skin Tone Scale by Dr. Monk and Google (available under a CC attribution 4.0 international license). It was developed for machine learning, so it's not exactly the same use case, but it provides 10 colors in a variety of formats, including hexadecimal. https://skintone.google/get-started
zild3d1 reply#
well its not a free as in beer color space
itishappy1 reply#
Pantone is not a color space. They are a supplier of physical color samples. Most pigments can be represented in a color space, but that representation differs based on illumination so it not unique. Some Pantone pigments, fluorescent colors in particular, cannot be represented by a color space at all!
tialaramex#
Yup. This is a rabbit hole like time. Learn a little bit about it, know there's a staggering amount more and then any time you actually need it, check that you've agreed on as much detail as you needed for the task and not less.

The person inviting you to a picnic "next week" might need to know about Time Zones if they live some distance away. The requirement to update the CSS on the web site to match a new company logo might need to know about Colour Spaces. But that picnic invite doesn't care about Calendar systems or Leap Seconds, and the logo mandate doesn't care about Sub-surface scattering or a Quantum theory of light.

automatoney#
Woah I LOVE both of these! When I get a chance these are 100% getting linked from the writeup.
dahart2 replies#
> What colors are we? The short answer is maybe something like “brown” and the long answer is very, very long.

Pete Shirley (author of Ray Tracing In One Weekend) is also a part time color scientist, and he clued me into the fact that if you crank the saturation to 100% of pictures of people of any race, the skin color comes out orange. I think I heard that some face detectors may work on this principle, but I don’t remember where I heard that.

madcaptenor2 replies#
and brown is just dark orange.
dahart#
Yes, true! Though cranking saturation doesn’t brighten colors (much… at least it’s not supposed to), and maybe interestingly, light brown isn’t quite orange. There might some asymmetry in color names.

So it might not be that surprising that dark skin people turn orange when sat is cranked, but perhaps slightly surprising that light skin people do.
Anyway, I suspect it’s computationally easier to turn everyone orange than brown. Plus, given that brown skin is already a category, orange could be useful terminology/category.

adamhartenz1 reply#
And orange is just a yellow red.
jagged-chisel#
Or a red yellow

Load more comments