Table of Contents

Struct RgbaColor

Namespace
EncDotNet.S100.Pipelines
Assembly
EncDotNet.S100.Core.dll

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

R byte
G byte
B byte
A byte

Properties

A

public byte A { get; init; }

Property Value

byte

B

public byte B { get; init; }

Property Value

byte

G

public byte G { get; init; }

Property Value

byte

R

public byte R { get; init; }

Property Value

byte

Transparent

Transparent (alpha = 0).

public static RgbaColor Transparent { get; }

Property Value

RgbaColor

Methods

FromHex(string)

Parses a hex colour string (e.g. "#61B7FF" or "#61B7FFCC") to an RgbaColor.

public static RgbaColor FromHex(string hex)

Parameters

hex string

Returns

RgbaColor

ToHex()

Returns the colour as a #RRGGBB hex string.

public string ToHex()

Returns

string