xterm method

void xterm(
  1. int color,
  2. {bool bg = false}
)

Directly index the xterm 256 color palette.

Implementation

void xterm(int color, {bool bg = false}) {
  _dirty = true;
  final c = color < 0
      ? 0
      : color > 255
          ? 255
          : color;
  if (bg) {
    _bcolor = c;
  } else {
    _fcolor = c;
  }
}