Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions doc/api/tty.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ to pass in an object with different settings.
Use the `NODE_DISABLE_COLORS` environment variable to enforce this function to
always return 1.

To enforce a specific color support it's possible to set either one of the
Comment thread
BridgeAR marked this conversation as resolved.
Outdated
following environment settings.
Comment thread
BridgeAR marked this conversation as resolved.
Outdated
This rule does not apply to Windows OS, CI environments and some other rare
Comment thread
BridgeAR marked this conversation as resolved.
Outdated
cases.

* 2 colors: `NODE_DISABLE_COLORS = 1`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works on Windows

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I updated the comment again to reflect that. PTAL.

* 16 colors: `TERM = 'console'`
* 256 colors: `TMUX = 1`
* 16,777,216 colors: `TERM_PROGRAM = 'Hyper'`

### writeStream.getWindowSize()
<!-- YAML
added: v0.7.7
Expand Down