code: protected function formatMessage($message, $format = [Console::FG_RED, Console::BOLD]) {
          $stream = (PHP_SAPI === 'cli') ? \STDERR : \STDOUT;
  
          if (Console::stream_supports_ansi_colors($stream)) {
              $message = Console::ansi_format($message, $format);
          }
  
          return $message;
      }
docs: Colorizes a message for console output.
  @param string $message the message to colorize.
  @param array $format the message format.
  @return string the colorized message.
  @see Console::ansiFormat() for details on how to specify the message format.