color function

String color(
  1. ConsoleColor color,
  2. Object input, {
  3. bool background = false,
  4. bool reset = true,
})

Colors the input with the given color.

Also see style and red, green, etc.

Implementation

String color(ConsoleColor color, Object input, {bool background = false, bool reset = true}) =>
    style(
      input,
      ConsoleTextStyle(
        color: color,
        backgroundColor: background ? color : null,
      ),
      reset,
    );