colorMix()
The colorMix
function allows you to mix two colors according to a specified weight in RGB color space.
This function returns a new Spectrum
instance representing the resulting color.
Usage
Parameters
colorMix(color1, color2, weight)
Parameter | Type | Required | Valid range | Description |
---|---|---|---|---|
color1 | Spectrum instance | true | - | The first color to mix |
color2 | Spectrum instance | true | - | The second color to mix |
weight | number | true | [0; 1] | The weight of the first color in the mixture. |
Return Value
The colorMix
function returns a new Spectrum
instance representing the mixed color.