Table of Contents

Struct RgbaFloat

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

A color stored in four 32-bit floating-point values, in RGBA component order.

public struct RgbaFloat : IEquatable<RgbaFloat>
Implements
Inherited Members

Constructors

RgbaFloat(Vector4)

Constructs a new RgbaFloat from the XYZW components of a vector.

public RgbaFloat(Vector4 channels)

Parameters

channels Vector4

The vector containing the color components.

RgbaFloat(float, float, float, float)

Constructs a new RgbaFloat from the given components.

public RgbaFloat(float r, float g, float b, float a)

Parameters

r float

The red component.

g float

The green component.

b float

The blue component.

a float

The alpha component.

Fields

Black

Black (0, 0, 0, 1)

public static readonly RgbaFloat Black

Field Value

RgbaFloat

Blue

Blue (0, 0, 1, 1)

public static readonly RgbaFloat Blue

Field Value

RgbaFloat

Clear

Clear (0, 0, 0, 0)

public static readonly RgbaFloat Clear

Field Value

RgbaFloat

CornflowerBlue

Cornflower Blue (0.3921f, 0.5843f, 0.9294f, 1)

public static readonly RgbaFloat CornflowerBlue

Field Value

RgbaFloat

Cyan

Cyan (0, 1, 1, 1)

public static readonly RgbaFloat Cyan

Field Value

RgbaFloat

DarkRed

Dark Red (0.6f, 0, 0, 1)

public static readonly RgbaFloat DarkRed

Field Value

RgbaFloat

Green

Green (0, 1, 0, 1)

public static readonly RgbaFloat Green

Field Value

RgbaFloat

Grey

Grey (0.25f, 0.25f, 0.25f, 1)

public static readonly RgbaFloat Grey

Field Value

RgbaFloat

LightGrey

Light Grey (0.65f, 0.65f, 0.65f, 1)

public static readonly RgbaFloat LightGrey

Field Value

RgbaFloat

Orange

Orange (1, 0.36f, 0, 1)

public static readonly RgbaFloat Orange

Field Value

RgbaFloat

Pink

Pink (1, 0.45f, 0.75f, 1)

public static readonly RgbaFloat Pink

Field Value

RgbaFloat

Red

Red (1, 0, 0, 1)

public static readonly RgbaFloat Red

Field Value

RgbaFloat

SizeInBytes

The total size, in bytes, of an RgbaFloat value.

public static readonly int SizeInBytes

Field Value

int

White

White (1, 1, 1, 1)

public static readonly RgbaFloat White

Field Value

RgbaFloat

Yellow

Yellow (1, 1, 0, 1)

public static readonly RgbaFloat Yellow

Field Value

RgbaFloat

Properties

A

The alpha component.

public float A { get; }

Property Value

float

B

The blue component.

public float B { get; }

Property Value

float

G

The green component.

public float G { get; }

Property Value

float

R

The red component.

public float R { get; }

Property Value

float

Methods

Equals(RgbaFloat)

Element-wise equality.

public bool Equals(RgbaFloat other)

Parameters

other RgbaFloat

The instance to compare to.

Returns

bool

True if all elements are equal; false otherswise.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns a string representation of this color.

public override string ToString()

Returns

string

ToVector4()

Converts this RgbaFloat into a Vector4.

public Vector4 ToVector4()

Returns

Vector4

Operators

operator ==(RgbaFloat, RgbaFloat)

Element-wise equality.

public static bool operator ==(RgbaFloat left, RgbaFloat right)

Parameters

left RgbaFloat

The first value.

right RgbaFloat

The second value.

Returns

bool

operator !=(RgbaFloat, RgbaFloat)

Element-wise inequality.

public static bool operator !=(RgbaFloat left, RgbaFloat right)

Parameters

left RgbaFloat

The first value.

right RgbaFloat

The second value.

Returns

bool