ColorBlend
|
Indicators |
SYNTAX | ColorBlend( colorFrom, colorTo, factor = 0.5 ) |
RETURNS | NUMBER |
FUNCTION | The function blends (mixes) colorFrom with colorTo with 'factor' proportion using the following algorithm
RGB = ( 1 - factor ) * RGB(colorFrom) + factor * RGB(colorTo ); So factor = 0 means use colorFrom only, factor = 1 means use colorTo only. All in-between values mean create mix of colors. The lower the factor value means more colorFrom. |
EXAMPLE | This function makes it easy to lighten or darken colors like this:
|
SEE ALSO | ColorRGB() function , ColorHSB() function |
The ColorBlend function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.