toHex static method

String toHex(
  1. Color color
)

Implementation

static String toHex(Color color) {
  return "#${color.toARGB32().toRadixString(16).toUpperCase().padLeft(8, "0")}";
}