ColorLerp
Calculates an intermediate color between two colors.
Syntax
ColorLerp(color1, color2, ratio])
color1 = first color
color2 = second color
ratio = ratio to apply to the two colors (between 0 and 1)
color2 = second color
ratio = ratio to apply to the two colors (between 0 and 1)
Remarks
The result of this function is used by the functions Fill, GradientPattern, FontColor and any other function that has a color as a parameter.
If ratio is <= 0, the result will be color1; if it is >= 1, the result will be color2.
For the intermediate values, linear interpolation will be applied to the individual RGB components.
Examples
ColorLerp('black', 'white', 1) = whiteColorLerp('black', 'white', 0) = blackColorLerp('black', 'white', 0.5) = mid-grayColorLerp('black', 'white', 0.75) = light gray