Reference > Methods
clrGetSat(color)
Definition
Integer clrGetSat(String color)
Description
Returns an Integer between 0-255 that is the saturation 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
| Integer r1 = clrGetSat("#FF0000"); // r1 == 65535
Integer r2 = clrGetSat("#FFFF00"); // r2 == 65535
Integer r3 = clrGetSat("#FFFFFF"); // r3 == 0
Integer r4 = clrGetSat("#ABC"); // r4 == 16383
Integer r5 = clrGetSat("#ABCD"); // r5 == 16383
Object r6 = clrGetSat("invalid"); // r6 == null
Object r7 = clrGetSat(null); // r7 == null
|