doc/tools/print_colors.py: more stable in unfriendly environments