Skip to content
Reference > Methods

clrGetGreen(color)

Definition

Integer clrGetGreen(String color)

Description

Returns an Integer between 0-255 that is the green component of the supplied color. Returns null if supplied color is null or invalid format.

Parameter Definition

Name Type Description
color String Color to inspect in rrggbb format

Examples

1
2
3
4
5
6
Integer r1 = clrGetGreen("#AABBCC"); // r1 == 187
Integer r2 = clrGetGreen("#AABBCCDD"); // r2 == 187
Integer r3 = clrGetGreen("#ABC"); // r3 == 187
Integer r4 = clrGetGreen("#ABCD"); // r4 == 187
Object r5 = clrGetGreen("invalid"); // r5 == null
Object r6 = clrGetGreen(null); // r6 == null