Class ColorHelper
Provides utility methods for parsing and converting color values from various input formats. Supports named colors, HEX strings, RGB/ARGB values, and ARGB integer representations.
Inheritance
System.Object
ColorHelper
Namespace: FastReport.Utils
Assembly: FastReport.Base.dll
Syntax
public static class ColorHelper
Methods
FromObject(Object, Color)
Converts an object of various types to a
Declaration
public static Color FromObject(object value, Color fallback = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | value | The input value. Supported types:
|
| Color | fallback | The color to return if conversion fails.
If not specified, defaults to |
Returns
| Type | Description |
|---|---|
| Color | A valid |
FromString(String)
Parses a string representation of a color into a
Declaration
public static Color? FromString(string input)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | input | The string to parse. Can be:
|
Returns
| Type | Description |
|---|---|
| System.Nullable<Color> | A |
Remarks
The method processes input in the following order: