Properties | ||
R | Controls the red channel output of the layer. Default: R |
|
G | Controls the green channel output of the layer. Default: G |
|
B | Controls the blue channel output of the layer. Default: B |
|
A | Controls the alpha channel output of the layer. This determines the layer's opacity. Default: A |
Usage
For each of the output channels, you can select the input channel you want to use for that output channel.
By default, each channel is mapped to itself: red to red, green to green, blue to blue, and alpha to alpha.
For each channel, you can select from the following options:
- R - Uses the value of the red input channel.
- G - Uses the value of the green input channel.
- B - Uses the value of the blue input channel.
- A - Uses the value of the alpha input channel.
- Y - Remaps the selected channel to the luminance of the layer.
- 0 - Uses the minimum value for this channel (for the alpha channel, this is transparent; set all three red, green and blue channels to this value to get black output)
- 1 - Uses the maximum value for this channel (for the alpha channel, this is opaque; set all three red, green and blue channels to this value to get white output)
Weighted Y
The luminance value is weighted so that it appears natural to humans.
For example, given the same value for the green and blue channels, the green channel is considered to have higher luminance because a given intensity of green light appears brighter to the human eye than the same intensity of blue light.
The exact formula used is:
Y = R * 0.2126 + G * 0.7152 + B * 0.0722
Alpha Handling
Setting the alpha channel to 1 on a layer with transparency can have unpredictable results in some cases: Even though a pixel is completely transparent, the RGB data for that pixel may still exist (albeit, not visibly becuase the alpha is zero). Therefore, forcing the alpha to 1 can result in the display of "garbage" data from completely transparent pixels.
In addition, depending on the phone or tablet you are using, pixels with an alpha of zero might have had their RGB cleared to black or premultipled by the alpha value (this reducing the color resolution of the data).
Forcing Alpha to 1 is best used only if the inputs of the other channels are not R, G or B.
Use Cases
- Convert a layer to grayscale: Set R, G, and B to Y
- Convert a layer to grayscale using only a single channel: Set R, G, and B all to the same input channel (for example, all to red)
- Convert a black and white mask into an alpha mask: Set A to Y, and R, G, and B to either 0 or 1. You can then apply a Solid Color effect to fill the masked area in the desired color. For a reverse effect (to use black as the opaque color) apply an Invert effect before applying Channel Remap (RGB)
- Generate a black-and-white mask from the alpha channel of an image: Set R, G, and B all to A, and set A to 1.