Following GCC:
-fdiagnostics-color[=WHEN]
-fno-diagnostics-color
using COBC_COLORS
, with a fallback to GCC_COLORS
(see link above) for configuration and if both are not set falling back to NO_COLORS
for disabling before checking the "installation default", which is to be set via configure's --with-diagnostics-color=choice
(to be copied into GnuCOBOL's configure script).
Note: for versions not implementing this, it is possible to use https://github.com/zaufi/pluggable-output-processor to get a reasonable highlighting.