setForegroundExtendedColor method

void setForegroundExtendedColor(
  1. int colorValue
)

Sets the foreground to one of 256 extended ANSI colors.

See https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit for the full set of colors. You may also run examples/demo.dart for this package, which provides a sample of each color in this list.

Implementation

void setForegroundExtendedColor(int colorValue) {
  assert(colorValue >= 0 && colorValue <= 0xFF,
      'Color must be a value between 0 and 255.');

  stdout.write(ansiSetExtendedForegroundColor(colorValue));
}