Table of Contents

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

R byte
G byte
B byte
A byte

Fields

Black

Black

public static readonly Color Black

Field Value

Color

Blue

Blue

public static readonly Color Blue

Field Value

Color

Green

Green

public static readonly Color Green

Field Value

Color

Red

Red

public static readonly Color Red

Field Value

Color

White

White

public static readonly Color White

Field Value

Color

Properties

A

public byte A { readonly get; set; }

Property Value

byte

B

public byte B { readonly get; set; }

Property Value

byte

G

public byte G { readonly get; set; }

Property Value

byte

R

public byte R { readonly get; set; }

Property Value

byte

Methods

FromHexString(string)

Converts a hex string into a color

public static Color FromHexString(string hex)

Parameters

hex string

Input string

Returns

Color

Color

FromString(string)

Converts a string into a color

public static Color FromString(string input)

Parameters

input string

Input string

Returns

Color

Color