enum
Foundation::Profile
Overview
The color capability of an output, from least to most capable. Mirrors termenv detection path from termenv.
Defined in:
foundation/profile.crEnum Members
-
NoTTY =
0 -
Ascii =
1 -
ANSI =
2 -
ANSI256 =
3 -
TrueColor =
4
Constructors
-
.detect(io : IO = STDOUT, env : Env = LiveEnv.new) : Profile
Detects the color profile from io's TTY status and env.
Instance Method Summary
-
#ansi256?
Returns
trueif this enum value equalsANSI256 -
#ansi?
Returns
trueif this enum value equalsANSI -
#ascii?
Returns
trueif this enum value equalsAscii -
#no_tty?
Returns
trueif this enum value equalsNoTTY -
#true_color?
Returns
trueif this enum value equalsTrueColor
Constructor Detail
Detects the color profile from io's TTY status and env. Honors NO_COLOR (no-color.org) and FORCE_COLOR (force-color.org). env only needs respond to []?.