This class stores information on colors used for toys and effects (e.g. RGBLed).
More...
|
RGBAColor | Clone () |
| Clones this instance.
|
RGBAColor | GetRGBAColor () |
| Gets a new RGBAColor instance with the same color values.
|
bool | SetColor (int Red, int Green, int Blue, int Alpha) |
| Sets the RGBA components of the Color.
|
bool | SetColor (int Red, int Green, int Blue) |
| Sets the RGB components of the Color.
The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.
|
bool | SetColor (RGBColor Color) |
| Sets the RGB components of the RGBAColor.
The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.
|
bool | SetColor (string Color) |
| Sets the RGBA components of the Color.
The parameter string Color ist first parsed for hexadecimal color codes and afterwards checked for comma separated color values.
The following values are accepted:
|
| RGBAColor () |
| Initializes a new instance of the RGBAColor class.
|
| RGBAColor (int BrightnessRed, int BrightnessGreen, int BrightnessBlue) |
| Initializes a new instance of the RGBAColor class.
If all color components are set to 0, the alpha value will be set to 0, otherwise the alpha value will be set to 255.
|
| RGBAColor (int BrightnessRed, int BrightnessGreen, int BrightnessBlue, int Alpha) |
| Initializes a new instance of the RGBAColor class.
|
| RGBAColor (string Color) |
| Initializes a new instance of the RGBAColor class.
The parameter string Color is first parsed for hexadecimal color codes and afterwards checked for comma separated color values.
The following values are accepted:
|
| RGBAColor (RGBColor RGBColor) |
| Initializes a new instance of the RGBAColor class. The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.
|
new string | ToString () |
|
int | Red [get, set] |
| Brightness for Red.
|
int | Green [get, set] |
| Brightness for Green.
|
int | Blue [get, set] |
| Brightness for Blue.
|
int | Alpha [get, set] |
| Alpha value for the color.
|
string | HexColor [get, set] |
| Returns the hexadecimal code for the color.
|
This class stores information on colors used for toys and effects (e.g. RGBLed).
◆ RGBAColor() [1/5]
DirectOutput.General.Color.RGBAColor.RGBAColor |
( |
| ) |
|
Initializes a new instance of the RGBAColor class.
◆ RGBAColor() [2/5]
DirectOutput.General.Color.RGBAColor.RGBAColor |
( |
int | BrightnessRed, |
|
|
int | BrightnessGreen, |
|
|
int | BrightnessBlue ) |
Initializes a new instance of the RGBAColor class.
If all color components are set to 0, the alpha value will be set to 0, otherwise the alpha value will be set to 255.
- Parameters
-
BrightnessRed | The brightness for red. |
BrightnessGreen | The brightness for green. |
BrightnessBlue | The brightness for blue. |
◆ RGBAColor() [3/5]
DirectOutput.General.Color.RGBAColor.RGBAColor |
( |
int | BrightnessRed, |
|
|
int | BrightnessGreen, |
|
|
int | BrightnessBlue, |
|
|
int | Alpha ) |
Initializes a new instance of the RGBAColor class.
- Parameters
-
BrightnessRed | The brightness for red. |
BrightnessGreen | The brightness for green. |
BrightnessBlue | The brightness for blue. |
Alpha | The alpha value for the color. |
◆ RGBAColor() [4/5]
DirectOutput.General.Color.RGBAColor.RGBAColor |
( |
string | Color | ) |
|
Initializes a new instance of the RGBAColor class.
The parameter string Color is first parsed for hexadecimal color codes and afterwards checked for comma separated color values.
The following values are accepted:
- Hexadecimal color code including alpha channel (e.g. #ff0000FF for fully opaque red).
- Hexadecimal color code without alpha channel (e.g. #ff0000 for red). If all color components are set to 0 (that equals black) the alpha value is set to 0 (fully transparent), otherwise to 255 (fully opaque).
- Comma separated color components including alpha channel (e.g. 255,0,0,128 for half transparent red).
- Comma separated color components without alpha channel (e.g. 255,0,0 for for fully opque red). If all color components are set to 0 (that equals black) the alpha value is set to 0 (fully transparent), otherwise to 255 (fully opaque).
- Parameters
-
◆ RGBAColor() [5/5]
DirectOutput.General.Color.RGBAColor.RGBAColor |
( |
RGBColor | RGBColor | ) |
|
Initializes a new instance of the RGBAColor class. The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.
- Parameters
-
◆ Clone()
RGBAColor DirectOutput.General.Color.RGBAColor.Clone |
( |
| ) |
|
Clones this instance.
- Returns
- A clone of this RGBAColor instance.
◆ GetRGBAColor()
RGBAColor DirectOutput.General.Color.RGBAColor.GetRGBAColor |
( |
| ) |
|
Gets a new RGBAColor instance with the same color values.
- Returns
◆ SetColor() [1/4]
bool DirectOutput.General.Color.RGBAColor.SetColor |
( |
int | Red, |
|
|
int | Green, |
|
|
int | Blue ) |
Sets the RGB components of the Color.
The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.
- Parameters
-
Red | Red brightness |
Green | Green brightness |
Blue | Blue brightness |
- Returns
- true
◆ SetColor() [2/4]
bool DirectOutput.General.Color.RGBAColor.SetColor |
( |
int | Red, |
|
|
int | Green, |
|
|
int | Blue, |
|
|
int | Alpha ) |
Sets the RGBA components of the Color.
- Parameters
-
Red | Red brightness |
Green | Green brightness |
Blue | Blue brightness |
Alpha | Alpha value for the color |
- Returns
- true
◆ SetColor() [3/4]
bool DirectOutput.General.Color.RGBAColor.SetColor |
( |
RGBColor | Color | ) |
|
Sets the RGB components of the RGBAColor.
The Alpha value is set to 0 if all color components are set to 0, otherwise the Alpha value will be set to 255.
- Parameters
-
Color | The RGB color to be set. |
- Returns
◆ SetColor() [4/4]
bool DirectOutput.General.Color.RGBAColor.SetColor |
( |
string | Color | ) |
|
Sets the RGBA components of the Color.
The parameter string Color ist first parsed for hexadecimal color codes and afterwards checked for comma separated color values.
The following values are accepted:
- Hexadecimal color code including alpha channel (e.g. #ff0000FF for fully opaque red).
- Hexadecimal color code without alpha channel (e.g. #ff0000 for red). If all color components are set to 0 (that equals black) the alpha value is set to 0 (fully transparent), otherwise to 255 (fully opaque).
- Comma separated color components including alpha channel (e.g. 255,0,0,128 for half transparent red).
- Comma separated color components without alpha channel (e.g. 255,0,0 for for fully opque red). If all color components are set to 0 (that equals black) the alpha value is set to 0 (fully transparent), otherwise to 255 (fully opaque).
- Parameters
-
Color | String describing the color. |
- Returns
- true if the parameter string contained a valid color code, otherwise false.
◆ ToString()
new string DirectOutput.General.Color.RGBAColor.ToString |
( |
| ) |
|
◆ Alpha
int DirectOutput.General.Color.RGBAColor.Alpha |
|
getset |
Alpha value for the color.
Alpha value between 0 and 255.
◆ Blue
int DirectOutput.General.Color.RGBAColor.Blue |
|
getset |
Brightness for Blue.
Brightness between 0 and 255.
◆ Green
int DirectOutput.General.Color.RGBAColor.Green |
|
getset |
Brightness for Green.
Brightness between 0 and 255.
◆ HexColor
string DirectOutput.General.Color.RGBAColor.HexColor |
|
getset |
Returns the hexadecimal code for the color.
6 digit hexadecimal color code with leading #(e.g. #ff0000 for red).
◆ Red
int DirectOutput.General.Color.RGBAColor.Red |
|
getset |
Brightness for Red.
Brightness between 0 and 255.
The documentation for this class was generated from the following file:
- D:/a/DirectOutput/DirectOutput/DirectOutput/General/Color/RGBAColor.cs