color mix - part-cw/lambdanative GitHub Wiki

(color-mix c1 c2 w)

color-mix mixes two colors in rgb space.

Parameter Description
c1 First color to be mixed
c2 Second color to be mixed
w Mixing weight of the two colors (0: all c1, 1: all c2)

Example

Example 1: Mix the colors red and green to get a dark yellow

> (define darkyellow (color-mix Red Green 0.5))
> (color-red darkyellow)
127
> (color-green darkyellow)
127
> (color-blue darkyellow)
0