{"_id":"@cjser/supports-color","_rev":"2-91bac87023a57ec361b3124c7a93dcce","name":"@cjser/supports-color","dist-tags":{"latest":"11.0.0-cjser.2"},"versions":{"10.2.2-cjser.2":{"name":"@cjser/supports-color","version":"10.2.2-cjser.2","keywords":["color","colour","colors","terminal","console","cli","ansi","styles","tty","rgb","256","shell","xterm","command-line","support","supports","capability","detect","truecolor","16m"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"@cjser/supports-color@10.2.2-cjser.2","maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"ava":{"serial":true,"workerThreads":false},"dist":{"shasum":"3afcc1d9445d46744b0071a065c123733052c6a0","tarball":"https://registry.npmjs.org/@cjser/supports-color/-/supports-color-10.2.2-cjser.2.tgz","fileCount":8,"integrity":"sha512-y3zJYFJtv3SFL9ZTWLxpBaFTfHqBy6CRhQ1aZhwi6gN91Bqu35NnXHdCeHdoBWEExSU2SksVEaZsAFkFWAGu7Q==","signatures":[{"sig":"MEQCICLD64m37l4kBh+JMIHtQgb8LM1SgTRjuU9o+7G+7a2yAiB6IVGttS+Ji007bvsl4B5PBAqhSwNJFi4CosFPASea3A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13412},"main":"./dist-cjser/index.cjs","type":"module","cjser":{"original":{"name":"supports-color","files":["index.js","index.d.ts","browser.js","browser.d.ts"],"exports":{"node":"./index.js","types":"./index.d.ts","default":"./browser.js"},"scripts":{"test":"xo && ava && tsd"},"version":"10.2.2","repository":"chalk/supports-color"},"cjserVersion":2,"sourceVersion":"10.2.2"},"types":"./index.d.ts","engines":{"node":">=18"},"exports":{"node":"./index.js","types":"./index.d.ts","default":"./browser.js","require":"./dist-cjser/index.cjs"},"funding":"https://github.com/chalk/supports-color?sponsor=1","gitHead":"0168e4aac54a1a9ca6f921419fa5ed9edb53ef4a","scripts":{"test":"xo && ava && tsd"},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"repository":{"url":"https://code.moenext.com/3rdeye/cjser.git","type":"git"},"_npmVersion":"10.7.0","description":"Detect whether a terminal supports color","directories":{},"sideEffects":false,"_nodeVersion":"20.14.0","_hasShrinkwrap":false,"devDependencies":{"xo":"^0.60.0","ava":"^6.2.0","tsd":"^0.31.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/supports-color_10.2.2-cjser.2_1778131076685_0.7341599794010947","host":"s3://npm-registry-packages-npm-production"}},"11.0.0-cjser.2":{"name":"@cjser/supports-color","version":"11.0.0-cjser.2","description":"Detect whether a terminal supports color","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/chalk/supports-color?sponsor=1","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","require":"./dist-cjser/index.cjs","node":"./index.js","default":"./browser.js"},"sideEffects":false,"engines":{"node":">=22"},"scripts":{"test":"xo && ava && tsd"},"keywords":["color","colour","colors","terminal","console","cli","ansi","styles","tty","rgb","256","shell","xterm","command-line","support","supports","capability","detect","truecolor","16m"],"devDependencies":{"@types/node":"^26.1.1","ava":"^8.0.1","tsd":"^0.33.0","xo":"^4.0.0"},"ava":{"serial":true,"workerThreads":false},"types":"./index.d.ts","main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"11.0.0","cjserVersion":2,"original":{"name":"supports-color","version":"11.0.0","exports":{"types":"./index.d.ts","node":"./index.js","default":"./browser.js"},"repository":"chalk/supports-color","files":["index.js","index.d.ts","browser.js","browser.d.ts"],"scripts":{"test":"xo && ava && tsd"}}},"_id":"@cjser/supports-color@11.0.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-Ox1uYjlKwkjjOzkJbcW109hd8IsdPa+hlXuYeCzxZeHsjSHFlaTwPDphhEZyUaksNervtu+GRvlAv+uF6AUU3w==","shasum":"53cca5041a2ea6feb3b91785e86acd0504774680","tarball":"https://registry.npmjs.org/@cjser/supports-color/-/supports-color-11.0.0-cjser.2.tgz","fileCount":8,"unpackedSize":14314,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDpC4zczLpG0uyHE2OrJblSLMMfZLMlGL52cHszczvPugIgPSBIBG2dpM/vRU9txu/CS6jdqaw6gNA8QAmO7O1CCtQ="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/supports-color_11.0.0-cjser.2_1785085434986_0.013963156802830001"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T05:17:56.540Z","modified":"2026-07-26T17:03:55.337Z","10.2.2-cjser.2":"2026-05-07T05:17:56.815Z","11.0.0-cjser.2":"2026-07-26T17:03:55.138Z"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","keywords":["color","colour","colors","terminal","console","cli","ansi","styles","tty","rgb","256","shell","xterm","command-line","support","supports","capability","detect","truecolor","16m"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"description":"Detect whether a terminal supports color","maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"readme":"# supports-color\n\n> Detect whether a terminal supports color\n\n## Install\n\n```sh\nnpm install supports-color\n```\n\n## Usage\n\n```js\nimport supportsColor from 'supports-color';\n\nif (supportsColor.stdout) {\n\tconsole.log('Terminal stdout supports color');\n}\n\nif (supportsColor.stdout.has256) {\n\tconsole.log('Terminal stdout supports 256 colors');\n}\n\nif (supportsColor.stderr.has16m) {\n\tconsole.log('Terminal stderr supports 16 million colors (truecolor)');\n}\n```\n\n## API\n\nReturns an `object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported.\n\nThe `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag:\n\n- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)\n- `.level = 2` and `.has256 = true`: 256 color support\n- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors)\n\n### Custom instance\n\nThe package also exposes the named export `createSupportColor` function that takes an arbitrary write stream (for example, `process.stdout`) and an optional options object to (re-)evaluate color support for an arbitrary stream.\n\n```js\nimport {createSupportsColor} from 'supports-color';\n\nconst stdoutSupportsColor = createSupportsColor(process.stdout);\n\nif (stdoutSupportsColor) {\n\tconsole.log('Terminal stdout supports color');\n}\n\n// `stdoutSupportsColor` is the same as `supportsColor.stdout`\n```\n\nThe options object supports a single boolean property `sniffFlags`. By default it is `true`, which instructs the detection 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.\n\n## Info\n\nIt obeys the `--color` and `--no-color` CLI flags.\n\nFor situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. A numeric `FORCE_COLOR` overrides the detected color support and sets the level directly, meaning the terminal cannot raise it to a higher level. Use `FORCE_COLOR=true` to instead only enable color and let the level be detected.\n\nExplicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively. These take precedence over a non-zero numeric `FORCE_COLOR`.\n\n## Related\n\n- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module\n- [supports-hyperlinks](https://github.com/chalk/supports-hyperlinks) - Detect whether a terminal supports hyperlinks\n- [supports-terminal-graphics](https://github.com/sindresorhus/supports-terminal-graphics) - Detect which terminal graphics protocols are supported\n- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right\n- [is-unicode-supported](https://github.com/sindresorhus/is-unicode-supported) - Detect whether the terminal supports Unicode\n- [is-interactive](https://github.com/sindresorhus/is-interactive) - Check if stdout or stderr is interactive\n\n## Maintainers\n\n- [Sindre Sorhus](https://github.com/sindresorhus)\n- [Josh Junon](https://github.com/qix-)\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/chalk/supports-color\n","readmeFilename":"readme.md"}