setBackgroundColor static method

void setBackgroundColor(
  1. int id, {
  2. bool xterm = false,
  3. bool bright = false,
})

Implementation

static void setBackgroundColor(int id,
    {bool xterm = false, bool bright = false}) {
  Color color;
  if (xterm) {
    var c = id.clamp(0, 256);
    color = Color(c, xterm: true);
    sgr(48, [5, c]);
  } else {
    color = Color(id, bright: true);
    if (bright) {
      sgr(40 + id, [1]);
    } else {
      sgr(40 + id);
    }
  }
  _currentBackgroundColor = color;
}