Class Color
Provides static methods for creating Color<T> values
public static class Color
- Inheritance
-
Color
- Inherited Members
Fields
OpaqueAlphaByte
A fully opaque alpha component value as a byte
public const byte OpaqueAlphaByte = 255
Field Value
OpaqueAlphaFloat
A fully opaque alpha component value as a float
public const float OpaqueAlphaFloat = 1
Field Value
TransparentAlphaByte
A fully transparent alpha component value as a byte
public const byte TransparentAlphaByte = 0
Field Value
TransparentAlphaFloat
A fully transparent alpha component value as a float
public const float TransparentAlphaFloat = 0
Field Value
Methods
From(byte)
public static Color<byte> From(byte value)
Parameters
Returns
Remarks
The red, green and blue component values of the resulting Color<byte> value will all be set to the specified value.
This results in a gray-scale color where 0 is black and 255 is white.
The alpha component value of the resulting Color<byte> value will be set to 255 (fully opaque).
From(byte, byte, byte)
Creates a new Color<byte> value from the specified red, green and blue component values as byte values
public static Color<byte> From(byte r, byte g, byte b)
Parameters
Returns
Remarks
From(byte, byte, byte, byte)
Creates a new Color<byte> value from the specified red, green, blue and alpha component values as byte values
public static Color<byte> From(byte r, byte g, byte b, byte a)
Parameters
rbyteThe red component value
gbyteThe green component value
bbyteThe blue component value
abyteThe alpha component value
Returns
From(float)
public static Color<float> From(float value)
Parameters
Returns
Remarks
The value used the the red, green and blue component values is expected to be in the range from 0 to 1.
The red, green and blue component values of the resulting Color<float> value will all be set to the specified value.
This results in a gray-scale color where 0 is black and 1 is white.
The alpha component value of the resulting Color<float> value will be set to 1 (fully opaque).
From(float, float, float)
Creates a new Color<float> value from the specified red, green and blue component values as float values
public static Color<float> From(float r, float g, float b)
Parameters
Returns
Remarks
The red, green and blue component values are expected to be in the range from 0 to 1, where 0 is the minimum component intensity and 1 is the maximum component intensity.
The alpha component value of the resulting Color<float> value will be set to 1 (fully opaque).
From(float, float, float, float)
Creates a new Color<float> value from the specified red, green, blue and alpha component values as float values
public static Color<float> From(float r, float g, float b, float a)
Parameters
rfloatThe red component value
gfloatThe green component value
bfloatThe blue component value
afloatThe alpha component value
Returns
Remarks
The red, green, blue and alpha component values are expected to be in the range from 0 to 1, where 0 is the minimum component intensity and 1 is the maximum component intensity.