From 662a4e43605e56e6c7cc75b91c99b8ee372dda33 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 6 Feb 2022 01:36:28 +0100 Subject: [PATCH] Add documentation about EnvColorProfile --- README.md | 4 ++++ termenv_windows.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 90db262..aeece33 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,10 @@ This returns one of the supported color profiles: - `termenv.ANSI256` - Extended 256 color ANSI support - `termenv.TrueColor` - RGB/TrueColor support +Alternatively, you can use `termenv.EnvColorProfile` which evaluates the +terminal like `ColorProfile`, but also respects the `NO_COLOR` and +`CLICOLOR_FORCE` environment variables. + You can also query the terminal for its color scheme, so you know whether your app is running in a light- or dark-themed environment: diff --git a/termenv_windows.go b/termenv_windows.go index 7f5b1ec..587779c 100644 --- a/termenv_windows.go +++ b/termenv_windows.go @@ -51,7 +51,7 @@ func backgroundColor() Color { // EnableWindowsANSIConsole enables virtual terminal processing on Windows // platforms. This allows the use of ANSI escape sequences in Windows console -// applications. Ensure this gets called before anything gets rendered with +// applications. Ensure this gets called before anything gets rendered with // termenv. // // Returns the original console mode and an error if one occurred.