Click or drag to resize

ColorExtensions Class

Provides some utility functions for Colors.
Inheritance Hierarchy
SystemObject
  Gamelogic.ExtensionsColorExtensions

Namespace:  Gamelogic.Extensions
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
[VersionAttribute(1, 0, 0)]
public static class ColorExtensions

The ColorExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberBrightness
Returns the brightness of the color, defined as the average off the three color channels.
Public methodStatic memberDarker
Returns a color darker than the given color.
Public methodStatic memberInvert
Returns a new color that is this color inverted.
Public methodStatic memberIsApproximatelyBlack
Returns whether the color is black or almost black.
Public methodStatic memberIsApproximatelyWhite
Returns whether the color is white or almost white.
Public methodStatic memberLighter
Returns a color lighter than the given color.
Public methodStatic memberOpaque
Returns an opaque version of the given color.
Public methodStatic memberWithAlpha
Returns the same color, but with the specified alpha.
Public methodStatic memberWithBrightness
Returns a new color with the RGB values scaled so that the color has the given brightness.
Top
See Also