String colorToHex(Color color) { // We need the pad left as the 0 from the value are removed when fetching the value. return color.value.toRadixString(16).toUpperCase().padLeft(6, '0'); }