ModulateRGB combines two colors by taking the alpha component of the first color and the clamped product of the RGB channels (c1.rgb * c2.rgb). For Color objects, the actual equation used for each of the 8 bit channels is: (((c1.rgb+1) * c2.rgb)>>8).
Parameters |
Description |
Color c1 |
The first (the destination) of two color parameters whose alpha component is set directly to the new color, while its RGB channels are multiplied with the second color's RGB channels to form the new color (return value). * |
Color c2 |
The second (the source) of two color parameters whose RGB channels are multiplied with the first color's channels to form the new color (return value). * |
Color c |
A color (the source) whose RGB channels are multiplied by the RGB channels of the current color (the destination). The current colors alpha component is not affected. |
The member function, taking one parameter (c), returns a Color reference to the current string, which was formed by multiplying the RGB channels of the passed color with the original color (this.rgb * c.rgb).
The static function, taking two parameters (c1 and c2), returns a new Color by value, which is formed from the first color's alpha component and the product of the two color's RGB channels ((c1.rgb * c2.rgb), c1.a). *
* - pertains to static function only.