-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
Any suggestions on how to disable colors when the output is not to a terminal that supports color?
I can use golang.org/x/crypto/ssh/terminal's terminal.IsTerminal to detect it, but not sure how to go about modifying chalk to support this. Ideally I'd like to add color in my code, and then have chalk return nothing when it detects this so I don't have to write a colored and non-colored version.
I tried overwriting the colors (chalk.Black, chalk.Red etc) from my project but that doesn't seem to work correctly.
Metadata
Metadata
Assignees
Labels
No labels