[]
Initializes a new instance of the ColorF struct.
public ColorF(float value)
Type | Name | Description |
---|---|---|
float | value | The value that will be assigned to all components. |
Initializes a new instance of the ColorF struct.
public ColorF(float red, float green, float blue, float alpha = 1)
Type | Name | Description |
---|---|---|
float | red | The red component of the color. |
float | green | The green component of the color. |
float | blue | The blue component of the color. |
float | alpha | The alpha component of the color. |
Initializes a new instance of the ColorF struct.
[CLSCompliant(false)]
public ColorF(uint argb)
Type | Name | Description |
---|---|---|
uint | argb | A packed unsigned integer containing all four color components in ARGB order. |
Initializes a new instance of the ColorF struct.
[CLSCompliant(false)]
public ColorF(uint rgb, float alpha)
Type | Name | Description |
---|---|---|
uint | rgb | A packed unsigned integer containing three color components in RGB order. |
float | alpha | The alpha component of the color. |
Initializes a new instance of the ColorF struct.
public ColorF(ColorF value, float alpha = 1)
Type | Name | Description |
---|---|---|
ColorF | value | The source ColorF. |
float | alpha | The alpha component of the color. |
Initializes a new instance of the ColorF struct.
public ColorF(Color color)
Type | Name | Description |
---|---|---|
Color | color | The System.Drawing.Color value. |
Initializes a new instance of the ColorF struct.
public ColorF(Vector3 value, float alpha = 1)
Type | Name | Description |
---|---|---|
Vector3 | value | The red, green, and blue components of the color. |
float | alpha | The alpha component of the color. |
Initializes a new instance of the ColorF struct.
public ColorF(Vector4 value)
Type | Name | Description |
---|---|---|
Vector4 | value | The red, green, blue, and alpha components of the color. |
Initializes a new instance of the ColorF struct.
public ColorF(float[] values)
Type | Name | Description |
---|---|---|
float[] | values | The values to assign to the red, green, blue, and alpha components of the color. This must be an array with four elements. |
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ArgumentOutOfRangeException | Thrown when |