や、この仕様実はマクロと一緒に使うと便利なので便利です
lo48576/sgr_macro: C/C++ macros to improve readability of SGRs.
https://github.com/lo48576/sgr_macro
printf(
"red char->" SGR(FG_RED)
"underline and bold->" SGR(UNDERLINE, BOLD)
"background green->" SGR(BG_GREEN)
"reset->" SGR(RESET) "sample end\n"
);