toColor method

Color toColor()

Implementation

Color toColor() {
  try {
    var c = this.replaceAll("#", "");
    if (c.length == 6) c = "FF" + c;
    return Color(int.parse(c, radix: 16));
  } catch (e) {
    throw 'Color parse error $e';
  }
}