I'm working on a project that will use whatever package manager is available to provision a freshly installed OS. Some examples of package managers could be apt for Ubuntu, brew and brew cask for OSX, or pacman for Arch.I'd like to display colored messages to stdout or stderr depending on what happens. I'm looking for some guidelines about what type of color and content I should use and where I should pipe the output.Thinking a little bit about it I came up with:status messages can be in blue or no color and only printed to stdout if the -v or --verbose flag is given.Ex:-* installing commandline-toolsSuccess messages in green and printed by default to stdout (or maybe if the verbose flag is given I'm not sure)Ex:-* installed commandline-toolsFailure messages in red and printed by default to stderrEx:-* failed to install commandline-toolsThoughts and opinions are welcome, but I would also appreciate some definitive sources/guidelines
What should my package-manager-like command line tool print to stdout/stderr?
linux;colors;stdout;stdin;messaging
Try this snippet, you will be able to color what you want :for i in {0..7};do    tput setaf $i // color next echo command    echo tput setaf $i    tput sgr0     // reset normal colorsdoneI recommend to not use raw ANSI escape code.