14 lines
300 B
Go

package color
import (
"os"
"git.akyoto.dev/go/color/tty"
)
// 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"