CrosshairColour record struct
public readonly record struct CrosshairColour A crosshair’s colour as four bytes, red, green, blue and alpha, written #rrggbb or #rrggbbaa in lowercase.
- Assembly
- EvilEngine.Formats
- Commit
- 4ff877b1
public readonly record struct CrosshairColour A crosshair’s colour as four bytes, red, green, blue and alpha, written #rrggbb or #rrggbbaa in lowercase.
public CrosshairColour(byte R, byte G, byte B, byte A) Makes a colour from its four bytes.
public static readonly CrosshairColour White Opaque white, #ffffffff.
public byte R { get; init; } Red, 0 to 255.
public byte G { get; init; } Green, 0 to 255.
public byte B { get; init; } Blue, 0 to 255.
public byte A { get; init; } Alpha, 0 to 255, where 255 is opaque.
public static bool TryParse(string text, out CrosshairColour colour) Reads #rrggbb, opaque, or #rrggbbaa, in lowercase hex, and returns false for anything else.