Name
MixRGB -- mix two colors (V2.0)
Synopsis
color = MixRGB(col1, col2, ratio)
Function
This function mixes the two specified colors at a specified ratio which must be in the range of 0 to 255. The second color will be mixed with the first color at the specified ratio, i.e. if ratio is 0, col1 will returned and if ratio is 255, col2 will be returned.

ratio can also be a string containing a percent specification, e.g. "50%".

Inputs
col1
color 1 in RGB format
col2
color 2 in RGB format
ratio
mixing ratio (0 to 255 or percent specification)
Results
color
mixed color
Example
c = MixRGB(#RED, #BLUE, 128)
This will mix a pink sort of color.

Show TOC