rgb
Style Library
This function converts a specified color into RGB values in a set.
Don't forget to include 'Style Library' at the top of your program
1
No. | Type | Description |
---|---|---|
1. reference |
set string |
Color The value must be provided in a variable which will be converted by this function to RGB colo Three possibiltes to specify the color:
|
Type | Description |
---|---|
string | Error message If a blank string is returned, then the conversion is successful, Otherwise, a comprehensible error message will be returned. |
a[0] = navy;
a[1] = {0,0,128};
a[2] = "#000080";
a[3] = "gnu not a color";
for all variables( a[], value[], i[] )
{
msg[] = rgb( value[] );
echo(i[], ": ", value[], ", Message: ", msg[] );
}
0: {0,0,128}, Message:
1: {0,0,128}, Message:
2: {0,0,128}, Message:
3: gnu not a color, Message: Specified color name 'gnu not a color' is unknown