CMY ratio to RGB spreadsheet for skin tones in darktable for color blind people

The above spreadsheet will give the ‘correct’ Green and Blue values after you input the Red value. The idea is to use the color picker in darkroom and then to adjust the RGB values according to the spreadsheet with the RGB Curve module. Since RGB values influence each other, one has to go back and forth a couple of times. One can also decrease the R value to begin with and go from there. I made it just now, so I am not sure about the best approach.

After reading the post Nailing skin tones in Darktable? by Bob, I looked for a way to get acceptable skin tones for (partly) color blind people in darktable. Although I believe that doing it by feel is probably better, this is apparently not for everybody and using the CMYK ratio method could be a starting point.

I wanted to work in darktable in RGB and without having to resort to third party color pickers. So I made a spreadsheet that proposes the G and B values based on the input of the R value. The CMY ratios used are M = 2.5 * C and Y = 3 * C . The ratios are somewhat arbitrary and can be changed in the spreadsheet.

One of the flaws is that the K value is missing, and I don’t know how to go about that. I am not a programmer nor knowledgeable about the implementantion of color in editing programs. This makes the sheet suitable for lighter skins only, I expect, but I am not sure, sorry.

I am new to this, and I only played a bit with numbers without color knowledge, so I may be totally wrong in my calculations and approach, trash me, correct me, find a better way, etc.

@alwinvrm

@jdc from RawTherapee has a lot of experience with skin tones. Maybe worth to contact him…

@alwinvrm Also see here:

Addendum: ooops. Just noted that you have already read that thread. Sorry for the noise!

Have fun!
Claes in Lund, Sweden

Thanks, I will try that.

I feel very uneasy about the CMYK&RGB ratios being “solutions” for skin tones. Not only in the sense of “i’m colorblind and need an aid in nailing proper colors” but also in general sense of it not being a solution at all.

First - CMYK & RGB - CMYK color model - Wikipedia - look at Conversion section and first thing that pops is “CMYK and RGB are device dependent and there is no general conversion formula between them”. Even worse is trying to adapt generic formula that “sorta works” based on some video with no related proof of ow it should “work” (eg scientific article, or even something other than gut feeling how skin looks)

Second - there’s not one “skin tone” nor even for “lighter” skin tones. if you were to apply this even as a starting point to portrait of me and my brother we’d look “off” (either one or another) since we do differ. If you were to shot male and female of same ancestry and age (say twins), you’d get similar thing. If one person were closer to light source than another - same thing. Oh… Light source!

3rd - light source, reflections, balance… light messes everything up :wink: or rather - light centric approach here would be a tad bit closer to reality but then

then there’s problem of getting “style” - you now “color grading”? Like in some movies some scenes are greenish, some are blueish, some are warm, some are cold… It all depends on mood (or chromatic adaptation) and this would fall apart in all situations like those.

So with goal being of getting “skin tones right” (stepping aside problem of being color blind), the steps should be same as for any color grading: relicate shot conditions and compensate for variations (think white balance etc), compensate for viewing intention (tbh showing picture on bright bg differs from showing on dim bg), optimize appearance of elements you want to show (think make subject “pop”), do the desired effect/mood/look of a scene.

3 Likes

To reinforce what @johnny-bit said, please reread my post.


The problem with this is that many papers still use the most egregious of colour spaces or models as their basis for skin detection, requiring hacks upon hacks to compensate for their deficiencies. Either that or they rely on machine learning. There is no in between in the “science”.


That said, video editors often include a vector scope. Often, people use its I line to ballpark skin tones.


PS Forgot to mention that you have to be careful about CMY. It is another colour model that CMYK is related to, so they are different things. Unless by CMY, you really mean CMYK.

CMY was a normal print separation about 100 years ago.
Also note that although CMYK nowadays is prevalent in many countries,
other print orders also exist, like YMCK, MYCK, KYMC and KCMY.
KYMC yields the greatest black point density.

Have fun!
Claes in Lund, Sweden

Why on Earth would you use CMY as a reference space for colour assessment ? For once, this is a topic for which CIE Lab has been specifically designed. Every time colour differences/distances are being discussed, CIE Lab / IPT / IPT-HDR / JzAzBz are relevant spaces. Everything else is geeks trying to be clever with numbers they don’t understand.

1 Like

A while ago, I played around with detecting skin tones in GMIC. One thing I did was get lots of photos of people and collect sample pixels from their skin. One thing that made it difficult to detect skin was that there was a lot more greenish and blueish tones than I was expecting.

One thing I ended up doing was having a very limited number of high probability skin tones, and then looking around those pixels for likely but less probable tones.

Judging tones on just colour values is very hard.

In any case, here is a PNG of some skin tones I collect from JPEGs. I make no claim as to it’s usfulness.

worldtones 3

A sensible choice or not: in this context it is important to note that the “C” in CMY does not have the same colour/nuance/hue as the “C” used in CMYK.

You will see that in the lower right corner of this photo from the Bookprinter’s Annual 1898-99, showing the modern three-colour-process.

Have fun!
Claes in Lund, Sweden

Yes. But. (This is the general gist of the below posting)

I agree with everything you write.
But is has to be mentioned that the TV/Movie world, a most often complete colormanaged world (don’t quote me on that!) sees this a bit more nuanced. Under standard illumination, melanin falls along one hue line in a vectoscope plot (top view onto YCbCr so that CbCr lie in the xy plane you look at, that hue line goes from zero saturation to saturated in one specific hue angle). Differences in skintone-hue lie close in hue angle to this line. The colors of skin with a lot of blood in it, are rotated in hue-angle and can be discerned on a vectorscope plot. So, under standard illumination, the hues of skintones are rather well definied in the rec.709 colorspace. Everything else you mention, style, creative intent, etc. still comes after that.

To me it is a bit of a mystery why even studio photographers who have the chance to control almost everything to a level that TV/Movies can control, do not care too much for skintones in a well defined colorspace. Sure, retouching and grading will change that skintone to whatever, but checking your calibration (or better the lack therof) with a vectorscope type plot is almost unheard of in the photography world. I don’t know why! Lower production value? Colorchecker calibration good enough for most? Multitude of colorspaces that are too much to handle?

This does not surprise me, if this jpeg-collection comes out of the photography world.

edit1: @afre caught me using wrong words :slight_smile: now it should be consistent.

addendum: that melanin story is more intricate to how I described it. there are two types of melanin with slightly different color. I am not sure which one the skintone line actually follows or whether it is a split-the-difference situation. the reasoning for that line still holds though, I think.

Some references for skin colours:

1 Like

@snibgo I may have read some of that at some point. Good to see it all in one place.

@PhotoPhysicsGuy I called it an I line in the other post. Has its history in tv signals and colour spaces as far as I know. I am confused by your use of the term saturation line. Saturation increases with distance from the centre.

It is because of their attention to detail that the skin tones are good. It comes down to the experience of the video, lighting and makeup crews. The industry is really good at coordinating and visioning from beginning to end. You should watch the The Mandalorian video I shared a while back. The technical, creative and leadership prowess of these people are something.

1 Like

I absolutely agree, but wonder why in photography this is different (is it though?). Is fixing-in-post so much more common? That is a different discussion maybe.

I can imagine scenarios where just fixing the skintones (getting them close to standard skintones under standard light in sRGB, AdobeRGB, ProPhoto), keeping the rest of the picture as is for whatever reasons, a very helpful tool. But that would require awareness for ‘wrong’ skintones from photographers. The most you hear is that certain camera makers have bad colorscience and that skin comes out weird. Tools for checking whats wrong? nope.

1 Like

The catch is probably in that “standard illumination”/“standard light”. A lot of photographers rarely use standard light, or use it in combination with non-standard light.
And if the lighting is not standard, correcting the skin colours only could look strange (I find that often the case with portraits taken during sunset with a fill flash).
Extreme exemple: a model on grass under a tree, for extra fun have him/her wear a bright red shirt; you expect the skin colour to be “non-standard” and to vary…

Also, film makers have to be able to combine shots from different days, making colour control much more important. And they have fairly standardised viewing conditions for their products, and much more specialised personnel: lighting, video, editors, etc.

1 Like

Hmm, I think this goes with some work I’m doing now on spectral sensitivity. I would think that, to get “representative” (I’ll not use the word accurate here…) skin tones one would want light containing the wavelengths that tickle the particular reflectances of skin. So, my notion of “standard” would be “full visible spectrum”, as opposed to some of the mixtures concocted by fluorescent and LED lighting.

I just bought a tungsten-halogen accent light for that; this source tails down in power as it approaches ultraviolet, but at least the visible spectrum has coverage.

1 Like

But even full-spectrum light can be different depending on the source, that’s why we have a white-balance control. And even with full-spectrum sources you can get mixed lighting. Have a look at a sunny snow-landscape: either the shades are blueish (“cold”), or the sunny areas are orangy (“warm”).
Unless, of course, someone has been messing around with masks.

So “standard illumination” has a colour temperature prescribed (temperature in K of a black body that radiates the light you want), which fully specifies the spectral composition.

1 Like

That is why red shirts must die.

3 Likes

Yes, the amount of highly specialized people working is greater, shot consistency is far more important…true. The viewing conditions differ a lot between print and cinema (dynamic range, colorspace)…so that might enforce more stringent control.