name property

String get name

Implementation

String get name {
  final colorName = toString().toLowerCase().split('.').last;
  final dashIndex = colorName.indexOf(RegExp(r'[0-9]'));
  final color = colorName.substring(0, dashIndex);
  final number = colorName.substring(dashIndex);
  return '$color-$number';
}