How to make white clothes black

Hi everyone,

I am new to Natron, still learning but quite impressed so far.

Currently I am playing around with rotoscoping, I’d like to change the color of a persons clothing in a video. The hard part is that the clothes are white and I need them to be black…

I created a mask for the part that needs to be modified, all fine there, I isolated what needs to be changed, but when it came to coloring I failed…

I tried pretty much all color nodes, but the only closest result I could get was via brightness/contrast/gain adjustments with combination of Sepia or black & white, which does not really look as intended.

Does anyone have a hint for me on how to approach this or what combination of nodes would give the desired effect?

Kind regards,

You can blend the cloth with the black color somehow. The only way to turn white to black is invert it, by subtracting the white value from value 1. But then the shadow will become brighter and the light area will become darker, which make no senes in this situation. So you need to take in account an extra black color and blend it with the cloth. It’s been a while I haven’t used Natron much so I can only give you the hint.

Depending on how detailed this needs to be you should be able to luma key the shirt to make a mask of it, if not you’ll need to roto the shirt out. Invert it as @TamerGester mentioned and crush the blacks down (grade node) so that it’s a little darker than it probably should be to remove the now-inverted lighting and then lift the whole shirt back up (also the grade node) so that it matches the darkest blacks in the scene, this will be your base layer.

Now the shirt is inverted and black! But we’re not done yet, we’ve gotta add back the detail, folds, lighting, all the other stuff that’s going on that makes it look like a shirt instead of a flat black shape. Luma key the shirt again and then use that alpha to drive some grade nodes (specifically their mask inputs) to manipulate the brightness of those areas on the new black shirt. You may have to roto some things as well to make it look right.

Finally, pay attention to the level of grain in the blacks of your image and replicate it for the shirt. This is a small subtle fix and you may not have to add a whole lot but these are the small things that sell the effect.

This may or may not work entirely as easily as described, I haven’t seen your footage obviously but hopefully these are some helpful first steps! This method is also dependent on how much data you have to deal with in your frames, garbage compressed jpegs or H264 video aren’t going to work very well with this technique.

1 Like


thank you @TamerGester and @Shrinks99 - your hints pointed me in the right direction, although I have to admit that I ended up with a slightly different setup. Basically, while trying to move along the suggestions from both posts it suddenly looked good less than halfway through the points :slight_smile:

To simplify things I made a photo of a white shirt on a white background (that’s what it will be in the video and btw the video source that I will be playing with is unfortunately H264).

So I started with inverting:

I was not sure if I did it correctly, but based on my novice knowledge of Natron and the understanding of the idea I created a white solid and did a minus merge with the original footage - that gave me the inverted shirt.

I then followed the instruction to blend it with a black color, because indeed inverted did not look black at all. I came up with a black solid and a color-burn merge. Of course the shadows were inverted at that point, i.e. dark areas were lighter and light areas appeared as shadows. While testing and trying things out I was surprised to see that I actually did not need the inversion at all! When I disabled the white solid & minus merge but kept the dark vs color-burn merge it looked a bit dull, but it did look correct. At that point I already had the Grade node in place ready to:

…and while playing around with the grade node I could suddenly get rid of the dull look and get it really black looking, while keeping the cloth folds and details - surprise! But it seems that at this point I was already done?

I’ll play around with the level of grain in the real H264 video, but for the basic test of “how to get it to black” I think that worked pretty well.

Of course the roto is not good enough and indeed I see that the black grain does not match (source of this image is a camera with JPEG compression), but those are details which I will iron out, so far I was really failing at blackening the cloth at all, so I am really happy that you guys pointed me in the right direction!

So here is the source image:

Here is the node graph:

And here is the result:

Except for the points mentioned above - what do you think? IMHO the black cloth really does look black!

Kind regards,


That’s cool!

That looks sick!! Looks like it was easier than I suspected. Tiny detail but you should reduce the light on the edge of the hanger around the neck of the shirt because now the light isn’t going to reflect off the shirt and onto the hanger.

Other than that you’re good to go, don’t worry too much about the grain if you’re just editing the colours of H264 footage.