Many terminals and terminal emulators display the bold variant as a different colour, rather than (or in addition to) actually thickening the characters. This provides increased flexibility when, say, customising your shell prompt, or configuring coloured ls output. However, it can also lead to problems on terminals that don't exhibit this behaviour if you are accustomed to having 16 distinct colours to work with.
The following is a quick C program I wrote that showcases the 8 ANSI
colours and their bold variants. It is useful for quickly seeing what colours your terminal provides, and how, if at all, the bold variants differ from the regular colours.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main (void) {
int c, p;
char * colours;
colours = malloc (64);
memset (colours, 0, 64);
strcpy (&colours[0*8], "black");
strcpy (&colours[1*8], "red");
strcpy (&colours[2*8], "green");
strcpy (&colours[3*8], "yellow");
strcpy (&colours[4*8], "blue");
strcpy (&colours[5*8], "magenta");
strcpy (&colours[6*8], "cyan");
strcpy (&colours[7*8], "white");
for (c=30; c<=37; c++) {
p = (c-30)*8;
printf ("\033[%im%s, \033[1mbold %s\033[0m\n",
c, &colours[p], &colours[p]);
}
free (colours);
exit (0);
}
Or in Perl:
#!/usr/bin/perl -w
use strict;
my @colours = ("black", "red", "green", "yellow", "blue", "magenta", "cyan",
"white");
do {
my $n = 37 - $#colours;
my $c = shift @colours;
print "\033[${n}m$c, \033[1mbold $c\033[0m\n";
} while (@colours);