Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RED function

RED function

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

See also

Returns the red component of a color. The return value is an integer in the range of 0 to 255, inclusive. The input is an index of a color in the document's color table, an expression that resolves to a custom color (like RGB or HSL), or a reference to a cell that contains a color index or color result. The function returns 0 for invalid input.

Syntax

RED(expression)

Remarks

The return value is a number in the range 0 to 255, inclusive, or a cell reference that resolves to an index. If expression is invalid, this function returns 0 (black).

Example 1

RED(22)

Returns 51 if the document uses the default Microsoft Visio color palette, where dark gray is the color at index 22.

Example 2

RED(Char.Color)

Returns the value of the red component of the current font color.

Example 3

RED(RGB(10, 20, 30))

Returns 10.

Show: