Struct Color
A 8 bit Color structure.
public readonly struct Color : IEquatable<Color>
- Implements
- Inherited Members
- Extension Methods
Constructors
- Color(byte, byte, byte, byte)
Constructs a new Color from the given rgba values.
- Color(float, float, float, float)
Constructs a new Color from the given rgba values.
Fields
- Alpha
Gets the alpha value of this color as a byte (0-255).
- Blue
Gets the blue value of this color as a byte (0-255).
- Green
Gets the green value of this color as a byte (0-255).
- Red
Gets the red value of this color as a byte (0-255).
Properties
- AlphaF
Gets the alpha value of this color as a float (0-1).
- BlueF
Gets the blue value of this color as a float (0-1).
- GreenF
Gets the green value of this color as a float (0-1).
- RedF
Gets the red value of this color as a float (0-1).
Methods
- Equals(Color)
Indicates whether the current object is equal to another object of the same type.
- Equals(object?)
Indicates whether this instance and a specified object are equal.
- FromRGBA(int)
Creates a Color structure from a 32-bit RGBA value.
- FromRGBA(string)
Creates a Color structure from a 32-bit RGBA hex string.
- FromRGBA(uint)
Creates a Color structure from an unsigned 32-bit RGBA value.
- GetHashCode()
Returns the hash code for this instance.
- ToColorToken()
Returns the 3 character sequence token for this color, used in coloring text.
This is mostly for internal use. Use ColorString(string, Color) for formatting text with a certain color.
- ToRGBA()
Gets the 32-bit RGBA value of this Color structure.
- ToString()
Returns the fully qualified type name of this instance.
- ToUnsignedRGBA()
Gets the unsigned 32-bit RGBA value of this Color structure.