Struct Color4
A 4-component RGBA color value.
public struct Color4
- Inherited Members
Constructors
Color4(F32, F32, F32)
Initializes a new instance from RGB values with alpha set to 1.
public Color4(F32 r, F32 g, F32 b)
Parameters
Color4(F32, F32, F32, F32)
Initializes a new instance of the Color4 struct.
public Color4(F32 r, F32 g, F32 b, F32 a)
Parameters
Fields
A
The alpha component.
public F32 A
Field Value
B
The blue component.
public F32 B
Field Value
G
The green component.
public F32 G
Field Value
R
The red component.
public F32 R
Field Value
Properties
Black
Gets a black color (0, 0, 0, 1).
public static Color4 Black { get; }
Property Value
Transparent
Gets a transparent color (0, 0, 0, 0).
public static Color4 Transparent { get; }
Property Value
White
Gets a white color (1, 1, 1, 1).
public static Color4 White { get; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
implicit operator Color4(uint)
Implicitly converts a packed 32-bit RGBA value (0xRRGGBBAA) to a Color4. Compatible with Xui.Core.Canvas.Colors web color constants.
public static implicit operator Color4(uint rgba)
Parameters
rgbauint
Returns
implicit operator Color4(Color)
public static implicit operator Color4(Color color)
Parameters
colorColor
Returns
operator *(Color4, Color4)
Multiplies two colors component-wise.
public static Color4 operator *(Color4 left, Color4 right)
Parameters
Returns
operator *(Color4, F32)
Multiplies a color by a scalar.
public static Color4 operator *(Color4 left, F32 right)