RGB_G

Returns the green component (as an Integer) from a given RGBA colour value.

Syntax: RGB_G( RGBA )

RGBA
required A Long RGBA colour value, of the kind returned by RGB or RGBA.

The return value is the green component in the range 0–255.

Common Errors

Error When
94 (&H5E), Invalid use of Null RGBA is Null

Example

This example extracts the green component from a colour built with RGB.

Dim MyColor As Long
Dim GreenComponent As Integer
MyColor = RGB(75, 125, 255)
GreenComponent = RGB_G(MyColor)       ' Returns 125.

See Also