GenericExtensionsMakeColorFromHex Method

Converts a hex string to a Color

Definition

Namespace: MobileTrack.Common.Extensions
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
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