XOrRGB combines two colors by taking the alpha component of the first color, along with the binary "xor" of the RGB channels (c1.rgb ^ c2.rgb). For Color objects, the same equation is used for the 8 bit alpha channel.
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 combined with the second color's RGB channel to form the RGB of the new color (return value). * |
Color c2 |
The second (the source) of two color parameters whose RGB channels are combined with the first colors channels to form the RGB of the new color (return value). * |
Color c |
A color (the source) whose RGB channels are combined with the RGB 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 "xoring" the two colors RGB channels (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, along with the "xor" of the two colors RGB channels ((c1.rgb ^ c2.rgb), c1.a). *
* - pertains to static function only.