360 Camera Techniques

TECHNIQUE: Getting rid of the magenta cast on Adobe DNG Raw files

How to get rid of the magenta cast in a raw file
How to get rid of the magenta cast in a raw file

Did you shoot in raw and find a magenta cast on your photo?  Why is that happening and more importantly, how do you fix it?  That’s the topic of this post!


The short answer is that it’s a limitation of the camera’s sensor.

Here’s the long answer: your camera sensor has a limited dynamic range.  When a light source is too bright, the sensor cannot record more information and it is simply recorded as 255 (the maximum value from 0 to 255).  This is called clipping.

Your  sensor is actually composed of separate photosensors for red, green and blue light.  The red, green and blue channels do not always clip at the same rate. When the green channel clips well before the red and blue channels, then you’re left with magenta.  In other words, when you see magenta highlights, it means that the green channel clipped before the red or blue channels, which is why the highlights look magenta.

I had this issue with my Fuji S5 Pro, and the Xiaomi Mijia Mi Sphere seems to have this issue when shooting in Adobe DNG Raw.


The simplest way to fix the magenta cast is to cut off the red and blue channels at the same point as the green channel.  Here’s how.

Step 1.  Adjust the exposure, white balance and other basic settings to your liking. Don’t worry about the magenta cast yet.

Step 2.  Adjust the tone curve:  in Camera Raw, go to the second tab for tone curve (in Lightroom it’s below the basic adjustments).  Drag the tip of the curve to the left until the magenta cast is gone.

That’s all.  From here, you just export the raw to JPG and stitch with your preferred panoramic stitcher.


Yes and no.  Yes, in the sense that there’s red and blue highlight detail that would be lost.  No, in the sense that the portion that is cut off (with red and blue channels only) is of limited use because it has no green channel information.  But if there are important details that you want to preserve, you can create another version of the photo, correct the color by pushing the green channel, and when the previously magenta parts are balanced, mask those highlights into the photo where you clipped the highlights.   Why not just use this version instead in the first place?  Because if you push the green channel, the rest of the photo will have color that doesn’t look right.

Do you have a better process for fixing the magenta highlights?  Pls. post in the comments!

About the author

Mic Ty

1 Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Heh, I just saw this, linked to from your article on the Qoocam 8k video sample.

    I’m kind of surprised you had highlight handling issues with the Mi Sphere, I’ve never seen that particular issue with RawTherapee or darktable with Mi Sphere DNGs. I wonder if early Sphere firmwares reported an improper DNG white point. (A proper white point is needed for highlight reconstruction algorithms to work correctly.)

    Most raw processors should have a highlight reconstruction module – https://rawpedia.rawtherapee.com/Exposure#Highlight_Reconstruction

Exit mobile version