AFAIK those color codes are ARGB codes (alpha-red-green-blue), and in hexadec format (so ff=255, 00=0).
|cffff0000(text)|r is red,
|cff00ff00(text)|r is green,
|cff0000ff(text)|r is blue,
|cffffcc00(text)|r is yellow.
00 means, that you don't use that color, ff means that you use maximal amount, and everything between means less or more color, after that it's just mixing them (like paint).