Class ColorExtensions
Namespace: QFSW.QC.Utilities
Assembly: QFSW.QC.dll
Syntax
public static class ColorExtensions
Methods
AppendColoredText(StringBuilder, String, Color)
Colors a string using rich formatting and inserts the result into a string builder.
Declaration
public static void AppendColoredText(this StringBuilder stringBuilder, string text, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | stringBuilder | String builder to add the result into |
| String | text | The text to color. |
| Color | color | The color to add to the text. |
Color32ToStringNonAlloc(Color32)
Declaration
public static string Color32ToStringNonAlloc(Color32 color)
Parameters
| Type | Name | Description |
|---|---|---|
| Color32 | color |
Returns
| Type | Description |
|---|---|
| String |
ColorText(String, Color)
Colors a string using rich formatting.
Declaration
public static string ColorText(this string text, Color color)
Parameters
| Type | Name | Description |
|---|---|---|
| String | text | The text to color. |
| Color | color | The color to add to the text. |
Returns
| Type | Description |
|---|---|
| String | The formatted text. |