Represents a color using 4 floats (rgba), with 0-1 range.
| Hex |
String representation of the form "#RRGGBB[AA]". |
| IsHdr |
Returns true if any component exceeds 1 |
| IsRepresentableInHex |
Returns true if this color can be represented in hexadecimal format (#RRGGBB[AA]).
This may not be the case if the color components are outside of [0,1] range. |
| IsSdr |
Returns true if all components are between 0 and 1 |
| Item |
|
| Luminance |
Returns the luminance of the color, basically it's grayscale value or "black and white version". |
| RawInt |
Integer representation of the form 0xAABBGGRR as used by native code. |
| Rgb |
String representation in the form of <see href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb">rgb</see>( r, g, b )
css function notation. |
| Rgba |
String representation in the form of <see href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgba">rgba</see>( r, g, b, a )
css function notation. |
| RgbaInt |
Integer representation of the form 0xRRGGBBAA. |
| RgbInt |
Integer representation of the form 0xRRGGBB. |
| AdjustHue |
Increases or decreases this color's hue |
| ComponentCountChangedBetweenColors |
Returns how many color components would be changed between this color and another color |
| Darken |
Darkens the color by given amount. |
| Desaturate |
Desaturates the color by given amount. |
| Invert |
Returns inverted color. Alpha is unchanged. |
| LerpTo |
Performs linear interpolation between this and given colors. |
| Lighten |
Lightens the color by given amount. |
| Saturate |
Saturates the color by given amount. |
| ToColor32 |
Convert to a Color32 (a 32 bit color value) |
| ToHsv |
Converts this color to a HSV format. |
| WithAlpha |
Returns this color with its alpha value changed |
| WithAlphaMultiplied |
Similar to Color.WithAlpha(System.Single) but multiplies the alpha instead of replacing. |
| WithBlue |
Returns this color with its blue value changed |
| WithColorMultiplied |
Returns a new version with only the red, green, blue components multiplied |
| WithGreen |
Returns this color with its green value changed |
| WithRed |
Returns this color with its red value changed |
| Average |
Returns a color whose components are averaged of all given colors. |
| FromBytes |
Creates a color from 0-255 range inputs, converting them to 0-1 range. |
| FromRgb |
Converts an integer of the form 0xRRGGBB into the color #RRGGBB with 100% alpha. |
| FromRgba |
Converts an integer of the form 0xRRGGBBAA into the color #RRGGBBAA. |
| Lerp |
Performs linear interpolation between two colors. |
| Max |
Returns a new color with each component being the maximum of the 2 given colors. |
| Min |
Returns a new color with each component being the minimum of the 2 given colors. |
| Parse |
Parse the color from a string. Many common formats are supported. |
| TryParse |
Try to parse the color. Returns true on success |