toRGB method

String toRGB()

Returns this color as String #rrggbb.

Implementation

String toRGB() {
  final rrggbb = rgb.fold(0x00000000,
      (rr, val) => (rr << 8) | (val.round().toInt() & 0x000000ff)) as int;
  return '#${rrggbb.toRadixString(16).padLeft(6, '0')}';
}