hex property

String get hex

Return uppercase RGB hex code string, with # and no alpha value. This format is often used in APIs and in CSS color values..

Implementation

String get hex {
  // ignore: lines_longer_than_80_chars
  return '#${value32bit.toRadixString(16).toUpperCase().padLeft(8, '0').substring(2)}';
}