darken color
Style Library
This function derives a darkened shade of a specified color
Don't forget to include 'Style Library' at the top of your program
2
No. | Type | Description |
---|---|---|
1. input |
set string |
Color Three possibiltes to specify the color:
|
2. input |
numeral | Darkening down factor e.g. factor 2 is the color precisely between white and specified color |
Type | Description |
---|---|
set | RGB color The color is specified in a set containing 3 numbers (0..255). |
for (i[] = 1, i[] <4, i[]++)
{
echo( new line, "Factor ", i[],":" );
echo( " Orange: ", darken color( orange, i[] ));
echo( " Navy: ", darken color( {0,0,128}, i[] ));
echo( " Teal: ", darken color( "#008080", i[] ));
}
Factor 1:
Orange: {255,192,0}
Navy: {0,0,128}
Teal: {0,128,128}
Factor 2:
Orange: {128,96,0}
Navy: {0,0,64}
Teal: {0,64,64}
Factor 3:
Orange: {85,64,0}
Navy: {0,0,43}
Teal: {0,43,43}