Skip to main content

Struct RgbaColor

Namespace: VelloSharp.Charting.Styling
Assembly: VelloSharp.Charting.dll

Simple RGBA color representation using normalized components.

public readonly record struct RgbaColor : IEquatable<RgbaColor>

Implements

IEquatable<RgbaColor>

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

RgbaColor(byte, byte, byte, byte)

Simple RGBA color representation using normalized components.

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

Parameters

R byte

G byte

B byte

A byte

Fields

Transparent

public static readonly RgbaColor Transparent

Field Value

RgbaColor

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

Methods

FromChartColor(ChartColor)

public static RgbaColor FromChartColor(ChartColor color)

Parameters

color ChartColor

Returns

RgbaColor

FromHex(uint)

public static RgbaColor FromHex(uint hex)

Parameters

hex uint

Returns

RgbaColor

ToHex()

public uint ToHex()

Returns

uint

ToVelloColor()

public RgbaColor ToVelloColor()

Returns

RgbaColor

WithAlpha(byte)

public RgbaColor WithAlpha(byte alpha)

Parameters

alpha byte

Returns

RgbaColor