RED
Gets the red channel of the specified color in the RGB colorspace. Returns an integer from 0 to 255. For more information about the RGB colorspace, see: https://en.wikipedia.org/wiki/RGB
Syntax
=RED(color)
Arguments
Argument | Type | Description |
---|---|---|
color | Color | The color |
Examples
=RED("#0000ff")
→0
Gets the red channel for the color represented by the hex color code #0000ff (blue)
=RED(RGB(128, 0, 0))
→128
Gets the red channel for a color having a value of 128 for red, 0 for green, and 0 for blue (dark red)
=RED(0)
→#ERROR!
Attempts to get the red channel from an integer, which is invalid because it cannot be converted to a color
Updated 10 months ago