Skip to content
EvilEngine.Formats.Records

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

Members

CrosshairColour constructor

public CrosshairColour(byte R, byte G, byte B, byte A)

Makes a colour from its four bytes.

White field

public static readonly CrosshairColour White

Opaque white, #ffffffff.

R property

public byte R { get; init; }

Red, 0 to 255.

G property

public byte G { get; init; }

Green, 0 to 255.

B property

public byte B { get; init; }

Blue, 0 to 255.

A property

public byte A { get; init; }

Alpha, 0 to 255, where 255 is opaque.

TryParse method

public static bool TryParse(string text, out CrosshairColour colour)

Reads #rrggbb, opaque, or #rrggbbaa, in lowercase hex, and returns false for anything else.