A 8 bit Color structure.
More...
|
| Color (byte red, byte green, byte blue, byte alpha=255) |
| Constructs a new Color from the given rgba values. More...
|
|
| Color (float red, float green, float blue, float alpha=1.0f) |
| Constructs a new Color from the given rgba values. More...
|
|
bool | Equals (Color other) |
|
override bool | Equals (object? obj) |
|
override int | GetHashCode () |
|
string | ToColorToken () |
| Returns the 3 character sequence token for this color, used in coloring text.
This is mostly for internal use. Use StringExtensions.ColorString for formatting text with a certain color. More...
|
|
int | ToRGBA () |
| Gets the 32-bit RGBA value of this Color structure. More...
|
|
override string | ToString () |
|
uint | ToUnsignedRGBA () |
| Gets the unsigned 32-bit RGBA value of this Color structure. More...
|
|
|
readonly byte | Alpha |
| Gets the alpha value of this color as a byte (0-255). More...
|
|
readonly byte | Blue |
| Gets the blue value of this color as a byte (0-255). More...
|
|
readonly byte | Green |
| Gets the green value of this color as a byte (0-255). More...
|
|
readonly byte | Red |
| Gets the red value of this color as a byte (0-255). More...
|
|
|
float | AlphaF [get] |
| Gets the alpha value of this color as a float (0-1). More...
|
|
float | BlueF [get] |
| Gets the blue value of this color as a float (0-1). More...
|
|
float | GreenF [get] |
| Gets the green value of this color as a float (0-1). More...
|
|
float | RedF [get] |
| Gets the red value of this color as a float (0-1). More...
|
|
◆ Color() [1/2]
Anvil.API.Color.Color |
( |
byte |
red, |
|
|
byte |
green, |
|
|
byte |
blue, |
|
|
byte |
alpha = 255 |
|
) |
| |
|
inline |
Constructs a new Color from the given rgba values.
- Parameters
-
red | The red value. |
green | The green value. |
blue | The blue value. |
alpha | The alpha value. |
◆ Color() [2/2]
Anvil.API.Color.Color |
( |
float |
red, |
|
|
float |
green, |
|
|
float |
blue, |
|
|
float |
alpha = 1.0f |
|
) |
| |
|
inline |
Constructs a new Color from the given rgba values.
- Parameters
-
red | The red value. |
green | The green value. |
blue | The blue value. |
alpha | The alpha value. |
◆ FromRGBA() [1/3]
static unsafe Color Anvil.API.Color.FromRGBA |
( |
int |
rgba | ) |
|
|
inlinestatic |
Creates a Color structure from a 32-bit RGBA value.
- Parameters
-
rgba | The 32-bit RGBA value. |
- Returns
- A Color structure representing the RGBA value.
◆ FromRGBA() [2/3]
static Color Anvil.API.Color.FromRGBA |
( |
string |
rgbaHexString | ) |
|
|
inlinestatic |
Creates a Color structure from a 32-bit RGBA hex string.
- Parameters
-
rgbaHexString | The 32-bit RGBA hex string. |
- Returns
- A Color structure representing the RGBA value.
◆ FromRGBA() [3/3]
static unsafe Color Anvil.API.Color.FromRGBA |
( |
uint |
rgba | ) |
|
|
inlinestatic |
Creates a Color structure from an unsigned 32-bit RGBA value.
- Parameters
-
rgba | The 32-bit RGBA value. |
- Returns
- A Color structure representing the RGBA value.
◆ ToColorToken()
string Anvil.API.Color.ToColorToken |
( |
| ) |
|
|
inline |
Returns the 3 character sequence token for this color, used in coloring text.
This is mostly for internal use. Use StringExtensions.ColorString for formatting text with a certain color.
- Returns
- The 3 character sequence token representing this color.
◆ ToRGBA()
int Anvil.API.Color.ToRGBA |
( |
| ) |
|
|
inline |
Gets the 32-bit RGBA value of this Color structure.
- Returns
- The 32-bit RGBA value of this Color.
◆ ToUnsignedRGBA()
uint Anvil.API.Color.ToUnsignedRGBA |
( |
| ) |
|
|
inline |
Gets the unsigned 32-bit RGBA value of this Color structure.
- Returns
- The 32-bit RGBA value of this Color.
◆ Alpha
readonly byte Anvil.API.Color.Alpha |
Gets the alpha value of this color as a byte (0-255).
◆ Blue
readonly byte Anvil.API.Color.Blue |
Gets the blue value of this color as a byte (0-255).
◆ Green
readonly byte Anvil.API.Color.Green |
Gets the green value of this color as a byte (0-255).
◆ Red
readonly byte Anvil.API.Color.Red |
Gets the red value of this color as a byte (0-255).
◆ AlphaF
float Anvil.API.Color.AlphaF |
|
get |
Gets the alpha value of this color as a float (0-1).
◆ BlueF
float Anvil.API.Color.BlueF |
|
get |
Gets the blue value of this color as a float (0-1).
◆ GreenF
float Anvil.API.Color.GreenF |
|
get |
Gets the green value of this color as a float (0-1).
◆ RedF
float Anvil.API.Color.RedF |
|
get |
Gets the red value of this color as a float (0-1).
The documentation for this struct was generated from the following file:
- NWN.Anvil/src/main/API/Color.cs