Struct Color
- Namespace
- AstraEngine.Canvas2D
- Assembly
- AstraEngine.Canvas2D.dll
Represents an RGBA color
public record struct Color : IEquatable<Color>
- Implements
- Inherited Members
- Extension Methods
Constructors
Color(byte, byte, byte, byte)
Represents an RGBA color
public Color(byte R, byte G, byte B, byte A)
Parameters
Fields
Black
Black
public static readonly Color Black
Field Value
Blue
Blue
public static readonly Color Blue
Field Value
Green
Green
public static readonly Color Green
Field Value
Red
Red
public static readonly Color Red
Field Value
White
White
public static readonly Color White
Field Value
Properties
A
public byte A { readonly get; set; }
Property Value
B
public byte B { readonly get; set; }
Property Value
G
public byte G { readonly get; set; }
Property Value
R
public byte R { readonly get; set; }
Property Value
Methods
FromHexString(string)
Converts a hex string into a color
public static Color FromHexString(string hex)
Parameters
hexstringInput string
Returns
- Color
Color
FromString(string)
Converts a string into a color
public static Color FromString(string input)
Parameters
inputstringInput string
Returns
- Color
Color