Struct RgbaColor
A renderer-agnostic RGBA colour value.
public readonly record struct RgbaColor : IEquatable<RgbaColor>
- Implements
- Inherited Members
Constructors
RgbaColor(byte, byte, byte, byte)
A renderer-agnostic RGBA colour value.
public RgbaColor(byte R, byte G, byte B, byte A = 255)
Parameters
Properties
A
public byte A { get; init; }
Property Value
B
public byte B { get; init; }
Property Value
G
public byte G { get; init; }
Property Value
R
public byte R { get; init; }
Property Value
Transparent
Transparent (alpha = 0).
public static RgbaColor Transparent { get; }
Property Value
Methods
FromHex(string)
Parses a hex colour string (e.g. "#61B7FF" or "#61B7FFCC") to an RgbaColor.
public static RgbaColor FromHex(string hex)
Parameters
hexstring
Returns
ToHex()
Returns the colour as a #RRGGBB hex string.
public string ToHex()