termcolor

Header-only C++ library for printing colored terminal messages

brewmacoslinux
Try with needOr install directly
Source

About

Header-only C++ library for printing colored messages

Commands

termcolor

Examples

Include termcolor header in C++ project for colored output$ #include <termcolor/termcolor.hpp> std::cout << termcolor::red << "Error!" << termcolor::reset << std::endl;
Use termcolor with CMake to find and link the library$ find_package(termcolor REQUIRED) target_link_libraries(myapp termcolor::termcolor)
Print colored text with background and text attributes$ std::cout << termcolor::on_yellow << termcolor::bold << "Warning" << termcolor::reset << std::endl;