GenericExtensionsMakeColorFromHex Method

Converts a hex string to a Color

Definition

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