Example:
// Get a color halfway between red and blue
uint purple = colorAverage(Colors.RED, Colors.BLUE, 0.5);uint colorAverage(uint c1, uint c2, float weight) nothrow @nogcAverages two colors together.
Returns a color that is a weighted average of the two input colors. A weight of 1.0 returns c1, a weight of 0.0 returns c2.
c1 | First color |
c2 | Second color |
weight | Weight of first color (0.0 to 1.0) |
Example:
// Get a color halfway between red and blue
uint purple = colorAverage(Colors.RED, Colors.BLUE, 0.5);