Colormix2(Value , ColorMinusOne , ColorOne[ , ColorZero])
This function returns an RGB color representation from a two color gradient with the possibility to specify an intermediate color for the center position, based on a value between -1 and 1.
If value = -1 the first color is returned.
If value = 1 the second color is returned.
If -1 < value < 1 the appropriate intermediate shading is returned.
Value is a real number between -1 and 1.
ColorMinusOne is a valid RGB color representation for the color to be associated with the low end of the interval.
ColorOne is a valid RGB color representation for the color to be associated with the high end of the interval.
ColorZero is an optional valid RGB color representation for the color to be associated with the center of the interval.
Examples:
colormix2(x, red( ) , green( ) )
colormix2(x, red( ) , green( ), black( ) )
The first example returns colors in a gradient from red to green, via brown. The second example returns a gradient from red to green, via black.
|