red method

AnsiPen red({
  1. bool bg = false,
  2. bool bold = false,
})

Sets red foreground (or background with bg: true, bright with bold: true).

Implementation

AnsiPen red({bool bg = false, bool bold = false}) {
  switch ((bg, bold)) {
    case (true, true):
      styleStack.add(QuectoColors.bgRedBright);
      break;
    case (true, false):
      styleStack.add(QuectoColors.bgRed);
      break;
    case (false, true):
      styleStack.add(QuectoColors.redBright);
      break;
    case (false, false):
      styleStack.add(QuectoColors.red);
      break;
  }
  return this;
}