HexColor extension

Helpful extensions on Color

on

Methods

toHex({bool leadingHashSign = true, bool includeAlpha = true}) String
Returns the textual representative of the Color as a hex string leadingHashSign - whether or not to prefix a hash symbol (#) (defaults to true) includeAlpha - whether or not to include the opacity of the colour (defaults to true)

Static Methods

fromHex(String hexString) Color
Create a Color from the supplied hexString