GenericExtensionsMakeColorFromHex Method

Converts a hex string to a Color

Definition

Namespace: MobileTrack.Common.Extensions
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
public static Color MakeColorFromHex(
	string color,
	float? opacity = null
)

Parameters

color  String
Color to convert
opacity  NullableSingle  (Optional)
Optional: opacity

Return Value

Color
Created color

Exceptions

ArgumentExceptionThrown when the color is not a valid hex color

See Also