Struct RgbaByte
- Namespace
- NeoVeldrid
- Assembly
- NeoVeldrid.dll
A color stored in four 8-bit unsigned normalized integer values, in RGBA component order.
public struct RgbaByte : IEquatable<RgbaByte>
- Implements
- Inherited Members
Constructors
RgbaByte(byte, byte, byte, byte)
Constructs a new RgbaByte from the given components.
public RgbaByte(byte r, byte g, byte b, byte a)
Parameters
rbyteThe red component.
gbyteThe green component.
bbyteThe blue component.
abyteThe alpha component.
Fields
A
The alpha component.
public readonly byte A
Field Value
B
The blue component.
public readonly byte B
Field Value
Black
Black (0, 0, 0, 255)
public static readonly RgbaByte Black
Field Value
Blue
Blue (0, 0, 255, 255)
public static readonly RgbaByte Blue
Field Value
Clear
Clear (0, 0, 0, 0)
public static readonly RgbaByte Clear
Field Value
CornflowerBlue
Cornflower Blue (100, 149, 237, 255)
public static readonly RgbaByte CornflowerBlue
Field Value
Cyan
Cyan (0, 255, 255, 255)
public static readonly RgbaByte Cyan
Field Value
DarkRed
Dark Red (153, 0, 0, 255)
public static readonly RgbaByte DarkRed
Field Value
G
The green component.
public readonly byte G
Field Value
Green
Green (0, 255, 0, 255)
public static readonly RgbaByte Green
Field Value
Grey
Grey (64, 64, 64, 255)
public static readonly RgbaByte Grey
Field Value
LightGrey
Light Grey (166, 166, 166, 255)
public static readonly RgbaByte LightGrey
Field Value
Orange
Orange (255, 92, 0, 255)
public static readonly RgbaByte Orange
Field Value
Pink
Pink (255, 155, 191, 255)
public static readonly RgbaByte Pink
Field Value
R
The red component.
public readonly byte R
Field Value
Red
Red (255, 0, 0, 255)
public static readonly RgbaByte Red
Field Value
White
White (255, 255, 255, 255)
public static readonly RgbaByte White
Field Value
Yellow
Yellow (255, 255, 0, 255)
public static readonly RgbaByte Yellow
Field Value
Methods
Equals(RgbaByte)
Element-wise equality.
public bool Equals(RgbaByte other)
Parameters
otherRgbaByteThe 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
objobjectThe 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
Operators
operator ==(RgbaByte, RgbaByte)
Element-wise equality.
public static bool operator ==(RgbaByte left, RgbaByte right)
Parameters
Returns
operator !=(RgbaByte, RgbaByte)
Element-wise inequality.
public static bool operator !=(RgbaByte left, RgbaByte right)