OS: ubuntu 22.04
output of "echo $TERM": xterm-256color
fmt version: 10.2.1
The following code can print colored text:
std::cout << "\033[1;31mbold red text\033[0m" << std::endl
OS: ubuntu 22.04
output of "echo $TERM": xterm-256color
fmt version: 10.2.1
The following code can print colored text:
std::cout << "\033[1;31mbold red text\033[0m" << std::endl
Copyright © 2021 Jogjafile Inc.
fmt::colorrequires RGB color support which is not available on some terminals. You can usefmt::terminal_colorinstead which is more widely supported:Godbolt: https://www.godbolt.org/z/e1qj5K8Ys.