String? colorToHexString(Color? color) { if (color == null) return null; return '#${(color.value & 0xFFFFFF).toRadixString(16).padLeft(6, '0').toUpperCase()}'; }