Show / Hide Table of Contents

Struct RgbaByte

A color stored in four 8-bit unsigned normalized integer values, in RGBA component order.

Implements
System.IEquatable<RgbaByte>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct RgbaByte : IEquatable<RgbaByte>

Constructors

RgbaByte(Byte, Byte, Byte, Byte)

Constructs a new RgbaByte from the given components.

Declaration
public RgbaByte(byte r, byte g, byte b, byte a)
Parameters
Type Name Description
System.Byte r

The red component.

System.Byte g

The green component.

System.Byte b

The blue component.

System.Byte a

The alpha component.

Fields

A

The alpha component.

Declaration
public readonly byte A
Field Value
Type Description
System.Byte

B

The blue component.

Declaration
public readonly byte B
Field Value
Type Description
System.Byte

Black

Black (0, 0, 0, 255)

Declaration
public static readonly RgbaByte Black
Field Value
Type Description
RgbaByte

Blue

Blue (0, 0, 255, 255)

Declaration
public static readonly RgbaByte Blue
Field Value
Type Description
RgbaByte

Clear

Clear (0, 0, 0, 0)

Declaration
public static readonly RgbaByte Clear
Field Value
Type Description
RgbaByte

CornflowerBlue

Cornflower Blue (100, 149, 237, 255)

Declaration
public static readonly RgbaByte CornflowerBlue
Field Value
Type Description
RgbaByte

Cyan

Cyan (0, 255, 255, 255)

Declaration
public static readonly RgbaByte Cyan
Field Value
Type Description
RgbaByte

DarkRed

Dark Red (153, 0, 0, 255)

Declaration
public static readonly RgbaByte DarkRed
Field Value
Type Description
RgbaByte

G

The green component.

Declaration
public readonly byte G
Field Value
Type Description
System.Byte

Green

Green (0, 255, 0, 255)

Declaration
public static readonly RgbaByte Green
Field Value
Type Description
RgbaByte

Grey

Grey (64, 64, 64, 255)

Declaration
public static readonly RgbaByte Grey
Field Value
Type Description
RgbaByte

LightGrey

Light Grey (166, 166, 166, 255)

Declaration
public static readonly RgbaByte LightGrey
Field Value
Type Description
RgbaByte

Orange

Orange (255, 92, 0, 255)

Declaration
public static readonly RgbaByte Orange
Field Value
Type Description
RgbaByte

Pink

Pink (255, 155, 191, 255)

Declaration
public static readonly RgbaByte Pink
Field Value
Type Description
RgbaByte

R

The red component.

Declaration
public readonly byte R
Field Value
Type Description
System.Byte

Red

Red (255, 0, 0, 255)

Declaration
public static readonly RgbaByte Red
Field Value
Type Description
RgbaByte

White

White (255, 255, 255, 255)

Declaration
public static readonly RgbaByte White
Field Value
Type Description
RgbaByte

Yellow

Yellow (255, 255, 0, 255)

Declaration
public static readonly RgbaByte Yellow
Field Value
Type Description
RgbaByte

Methods

Equals(Object)

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

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object to compare with the current object.

Returns
Type Description
System.Boolean

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

Overrides
System.ValueType.Equals(System.Object)

Equals(RgbaByte)

Element-wise equality.

Declaration
public bool Equals(RgbaByte other)
Parameters
Type Name Description
RgbaByte other

The instance to compare to.

Returns
Type Description
System.Boolean

True if all elements are equal; false otherswise.

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

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

Overrides
System.ValueType.GetHashCode()

ToString()

Returns a string representation of this color.

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Operators

Equality(RgbaByte, RgbaByte)

Element-wise equality.

Declaration
public static bool operator ==(RgbaByte left, RgbaByte right)
Parameters
Type Name Description
RgbaByte left

The first value.

RgbaByte right

The second value.

Returns
Type Description
System.Boolean

Inequality(RgbaByte, RgbaByte)

Element-wise inequality.

Declaration
public static bool operator !=(RgbaByte left, RgbaByte right)
Parameters
Type Name Description
RgbaByte left

The first value.

RgbaByte right

The second value.

Returns
Type Description
System.Boolean

Implements

System.IEquatable<T>
Back to top