ColorExtensions Class
Namespace: Stride.Core.MathematicsAssembly: Stride.Core.Mathematics.dll
A class containing extension methods for processing colors.
public static class ColorExtensions
| Name | Description | |
|---|---|---|
| Methods | ||
| CanConvertStringToRgba(String) | Indicates if the given string can be converted to an System.UInt32 RGBA value using StringToRgba(String). |
|
| RgbaToString(Int32) | Converts the given RGBA value to a string. |
|
| RgbToString(Int32) | Converts the given RGB value to a string. |
|
| StringToRgba(String) | Converts the given string to an System.UInt32 RGBA value. |
|
Methods
CanConvertStringToRgba(String)
Indicates if the given string can be converted to an System.UInt32 RGBA value using StringToRgba(String).
public static bool CanConvertStringToRgba(string stringColor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | stringColor | The string to convert. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the string can be converted, false otherwise. |
RgbaToString(Int32)
Converts the given RGBA value to a string.
public static string RgbaToString(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | value | The RGBA value to convert. |
Returns
| Type | Description |
|---|---|
| System.String | The converted string. |
RgbToString(Int32)
Converts the given RGB value to a string.
public static string RgbToString(int value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | value | The RGB value to convert. |
Returns
| Type | Description |
|---|---|
| System.String | The converted string. |
StringToRgba(String)
Converts the given string to an System.UInt32 RGBA value.
public static uint StringToRgba(string stringColor)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | stringColor | The string to convert. |
Returns
| Type | Description |
|---|---|
| System.UInt32 | The converted RGBA value. |