hex property

String get hex
inherited

Returns this as a hexidecimal string.

Implementation

String get hex {
  final rgb = toRgbColor().toList();

  var hex = '#';

  for (var value in rgb) {
    hex += value.toRadixString(16).padLeft(2, '0');
  }

  return hex;
}