mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-22 12:59:21 +00:00
15 lines
330 B
Dart
15 lines
330 B
Dart
import 'dart:ui';
|
|
|
|
/// Color utilities
|
|
///
|
|
/// @author Pierre Hubert
|
|
|
|
String colorToHex(Color color) {
|
|
if (color == null) return "";
|
|
|
|
return (color.red.toRadixString(16).padLeft(2, '0') +
|
|
color.green.toRadixString(16).padLeft(2, '0') +
|
|
color.blue.toRadixString(16).padLeft(2, '0'))
|
|
.toUpperCase();
|
|
}
|