kitHex function

String kitHex(
  1. Color c
)

#RRGGBB, or #AARRGGBB when not opaque.

Implementation

String kitHex(Color c) {
  final argb = c.toARGB32();
  final hex = argb.toRadixString(16).padLeft(8, '0').toUpperCase();
  return '#${argb >>> 24 == 0xFF ? hex.substring(2) : hex}';
}