Added ANSI colors for old terminals
This commit is contained in:
parent
e0bfa137d5
commit
77e626de5d
2 changed files with 8 additions and 5 deletions
|
@ -6,5 +6,8 @@ import (
|
|||
"git.akyoto.dev/go/color/tty"
|
||||
)
|
||||
|
||||
// Terminal is a boolean that indicates if we're in a terminal with truecolor support.
|
||||
var Terminal = tty.IsTerminal(os.Stdout.Fd()) && os.Getenv("COLORTERM") == "truecolor"
|
||||
// Terminal indicates if we're in a terminal with truecolor support.
|
||||
var Terminal = tty.IsTerminal(os.Stdout.Fd())
|
||||
|
||||
// TrueColor indicates if the terminal has 24-bit color support.
|
||||
var TrueColor = os.Getenv("COLORTERM") == "truecolor"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue