3 Replies Latest reply: Apr 26, 2010 6:50 AM by Shane Li RSS

    Value used when applying a gradient map to RGB image

    Shane Li Community Member

       

       

      Hi:

       

      I am trying to do a color classification in Photoshop using Gradient Map, so those colors of certain range in the original image maps to a given color chosen in Gradient.

      The final product is somehow predictable if the original image is a grayscale image. However, if the original scale is a RGB image, which value will be used to determine the color applied to each pixel in the gradient?

      There's lots of ways to calculate brightness from a RGB image, such as (0.2126*R) + (0.7152*G) + (0.0722*B). I have tried to use a few, but none of them can be used to predict the actual color used by Photoshop to generate gradient.

       

      Does anyone know the formula used by Photoshop to determine with color a RGB pixel maps to?

       

      Thanks,

      Shane Li