Function getColor

  • Gets the ANSI escape sequence for a color. This can be used to set the foreground or background color of text. If a custom RGB color is provided, the background property can be set to true to get the background color escape sequence.

    Returns

    The ANSI escape sequence for the color.

    Parameters

    • color: Foreground | Background | {
          background?: boolean;
          blue: number;
          green: number;
          red: number;
      }

      The color to get the ANSI escape sequence for. Can be a Foreground or Background enum, or a custom RGB color.

    Returns string

Generated using TypeDoc