getColorPen method

AnsiPen getColorPen()

Implementation

AnsiPen getColorPen() {
  var color = 253; // Grey 85
  switch (name) {
    case "verbose":
      color = 39; // 	DeepSkyBlue 1
      break;
    case "debug":
      color = 127; // Magenta 3
      break;
    case "info":
      color = 34; // Green 3
      break;
    case "warning":
      color = 172; // Orange 3
      break;
    case "error":
      color = 124; // Red 3
      break;
    case "unknown":
      color = 253; // Grey 85
      break;
  }

  return AnsiPen() // Return ansi term color.
    ..reset()
    ..xterm(color);
}