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
channelsVector4The 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
rfloatThe red component.
gfloatThe green component.
bfloatThe blue component.
afloatThe alpha component.
Fields
Black
Black (0, 0, 0, 1)
public static readonly RgbaFloat Black
Field Value
Blue
Blue (0, 0, 1, 1)
public static readonly RgbaFloat Blue
Field Value
Clear
Clear (0, 0, 0, 0)
public static readonly RgbaFloat Clear
Field Value
CornflowerBlue
Cornflower Blue (0.3921f, 0.5843f, 0.9294f, 1)
public static readonly RgbaFloat CornflowerBlue
Field Value
Cyan
Cyan (0, 1, 1, 1)
public static readonly RgbaFloat Cyan
Field Value
DarkRed
Dark Red (0.6f, 0, 0, 1)
public static readonly RgbaFloat DarkRed
Field Value
Green
Green (0, 1, 0, 1)
public static readonly RgbaFloat Green
Field Value
Grey
Grey (0.25f, 0.25f, 0.25f, 1)
public static readonly RgbaFloat Grey
Field Value
LightGrey
Light Grey (0.65f, 0.65f, 0.65f, 1)
public static readonly RgbaFloat LightGrey
Field Value
Orange
Orange (1, 0.36f, 0, 1)
public static readonly RgbaFloat Orange
Field Value
Pink
Pink (1, 0.45f, 0.75f, 1)
public static readonly RgbaFloat Pink
Field Value
Red
Red (1, 0, 0, 1)
public static readonly RgbaFloat Red
Field Value
SizeInBytes
The total size, in bytes, of an RgbaFloat value.
public static readonly int SizeInBytes
Field Value
White
White (1, 1, 1, 1)
public static readonly RgbaFloat White
Field Value
Yellow
Yellow (1, 1, 0, 1)
public static readonly RgbaFloat Yellow
Field Value
Properties
A
The alpha component.
public float A { get; }
Property Value
B
The blue component.
public float B { get; }
Property Value
G
The green component.
public float G { get; }
Property Value
R
The red component.
public float R { get; }
Property Value
Methods
Equals(RgbaFloat)
Element-wise equality.
public bool Equals(RgbaFloat other)
Parameters
otherRgbaFloatThe 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
ToVector4()
Converts this RgbaFloat into a Vector4.
public Vector4 ToVector4()
Returns
Operators
operator ==(RgbaFloat, RgbaFloat)
Element-wise equality.
public static bool operator ==(RgbaFloat left, RgbaFloat right)
Parameters
Returns
operator !=(RgbaFloat, RgbaFloat)
Element-wise inequality.
public static bool operator !=(RgbaFloat left, RgbaFloat right)