ColorExtensions Class |
Namespace: Gamelogic.Extensions
[VersionAttribute(1, 0, 0)] public static class ColorExtensions
The ColorExtensions type exposes the following members.
Name | Description | |
---|---|---|
Brightness |
Returns the brightness of the color,
defined as the average off the three color channels.
| |
Darker |
Returns a color darker than the given color.
| |
Invert |
Returns a new color that is this color inverted.
| |
IsApproximatelyBlack |
Returns whether the color is black or almost black.
| |
IsApproximatelyWhite |
Returns whether the color is white or almost white.
| |
Lighter |
Returns a color lighter than the given color.
| |
Opaque |
Returns an opaque version of the given color.
| |
WithAlpha |
Returns the same color, but with the specified alpha.
| |
WithBrightness |
Returns a new color with the RGB values scaled so that the color has the given
brightness.
|