Update:
The answer was meanwhile corrected. I'll let this up anyway, as I like how I illustrated the connection between the colour palette and the codes. ;)
A correction for the accepted answer by @desgua :
The table is wrong. To access the colours of the second column in the table (which corresponds to the second row of the colour palette), you need numbers 90 to 97 and not 30 to 37. The latter are just for the first column in the table (first row in the palette).
Also, the first number 00 or 01 in front of the semicolon just affects whether the font is printed bold or not. 1or 01 for bold and 00, or 0 or simply nothing (and no semicolon) for normal text.
Corrected table:
Black 30 Dark Gray 90
Red 31 Light Red 91
Green 32 Light Green 92
Brown 33 Yellow 93
Blue 34 Light Blue 94
Purple 35 Light Purple 95
Cyan 36 Light Cyan 96
Light Gray 37 White 97

Whether it's cyan, red, green etc., depends on the colours you've configured in the colour palette. Those numbers are just selectors for the 16 entries of the colour palette and don't encode colour information themselves.
So, in my case for example, using the default GNOME colour palette, I've configured it like this:
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;94m\]\u\[\033[01;36m\]@\[\033[01;32m\]\h\[\033[00m\]:\[\033[01;94m\]\w\[\033[00m\]\$ '
[01;94m\]\u: username bold, 5th colour of second palette row (light blue)
[01;36m\]@: @ bold, 7th colour of first palette row (cyan)
[01;32m\]\h: hostname bold, third colour of first palette row (green)