hex method

Chalk hex(
  1. dynamic hex
)

Returns a Chalk with the foreground color set to the passed in RGB Hex code. This dynamically accepts color hex codes as integer codes (0xAABBCC) or (0xABC) or as strings ('#AABBCC') or ('#ABC')

Implementation

Chalk hex(dynamic hex) {
  var rgb = ColorUtils.hex2rgb(hex);
  return makeRGBChalk(rgb[0], rgb[1], rgb[2]);
}