• Version 8.1.3
  • Published
  • 4.78 kB
  • No dependencies
  • MIT license


npm i @types/supports-color
yarn add @types/supports-color
pnpm add @types/supports-color


TypeScript definitions for supports-color



variable stderr

const stderr: supportsColor.SupportsColor;

    variable stdout

    const stdout: supportsColor.SupportsColor;


      function supportsColor

      supportsColor: (
      stream: { isTTY?: boolean | undefined },
      options?: supportsColor.Options
      ) => supportsColor.SupportsColor;


        namespace supportsColor

        namespace supportsColor {}

          interface Level

          interface Level {}

            property has16m

            has16m: boolean;

              property has256

              has256: boolean;

                property hasBasic

                hasBasic: boolean;

                  property level

                  level: number;

                    interface Options

                    interface Options {}

                      property isTTY

                      isTTY?: boolean | undefined;

                        property sniffFlags

                        sniffFlags?: boolean | undefined;
                        • By default it is true, which instructs supportsColor() to sniff process.argv for the multitude of --color flags (see _Info_ below). If false, then process.argv is not considered when determining color support. true

                        type SupportsColor

                        type SupportsColor = false | Level;

                          Package Files (1)

                          Dependencies (0)

                          No dependencies.

                          Dev Dependencies (0)

                          No dev dependencies.

                          Peer Dependencies (0)

                          No peer dependencies.


                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/supports-color.

                          • Markdown
                          • HTML
                            <a href="https://www.jsdocs.io/package/@types/supports-color"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>