{"repo":"muesli/termenv","free":true,"listed":false,"github":"https://github.com/muesli/termenv","clone":"git clone https://github.com/muesli/termenv.git","description":"Advanced ANSI style & color support for your terminal applications","language":"Go","stars":2020,"topics":["ansi","colors","tui","styling","golang","terminal","console"],"license":"MIT","category":"cli-tools","readme_excerpt":"termenv lets you safely use advanced styling options on the terminal. It gathers information about the terminal environment in terms of its ANSI & color support and offers you convenient methods to colorize and style your output, without you having to deal with all kinds of weird ANSI escape sequences and color conversions. Features - RGB/TrueColor support - Detects the supported color range of your terminal - Automatically converts colors to the best matching, available colors - Terminal theme (light/dark) detection - Chainable syntax - Nested styles Installation Usage termenv queries the terminal's capabilities it is running in, so you can safely use advanced features, like RGB colors or ANSI styles. output.Profile returns the supported profile: - termenv.Ascii - no ANSI support detected, ASCII only - termenv.ANSI - 16 color ANSI support - 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: Manual Profile Selection If you don't want to rely on the automatic detection, you can manually select the profile you want to use: Colors termenv supports multiple color profiles: Ascii (black & white only), ANSI (16 colors), ANSI Extended (256","default_branch":null,"files":null,"tree":[],"storefront":"/r/muesli","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/muesli/termenv/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}