BLEND Function

Blends two colors in the proportion specified by the float parameter.

Syntax

BLEND(color1, **color2 **, float[0,1] )

Parameters

Name Required/Optional Data Type Description
color1
Required
Numeric
The Visio color index or RGB value of the first color.
color2
Required
Numeric
The Visio color index or RGB value of the second color.
float[0,1]
Required
Float
The proportion in which to blend color2 and color1, respectively. A real number from 0 to 1 inclusive.

Return value

RGB

Remarks

The color returned is determined by the relative proportions in which to blend color2 and color1, respectively, as specified by the float parameter. For example, if float is 0.25, the color returned is composed 75% of color1 and 25% of color2.

Another way to think about it is that the float value corresponds to the point along the color spectrum from color1 to color2. Therefore, smaller numbers (closer to zero) for float produce blends closer to color1, while larger numbers (closer to 1) produce blends closer to color2.