rgb2hex function

String rgb2hex (
  1. List<num> rgb
)

returns a hex string

Implementation

String rgb2hex(List<num> rgb) =>
    rgb.fold('#', (hex, c) => hex + _padHex(c.round().toRadixString(16)));