Here's how it works. You say <color:XYZ> in the string. X, Y, and Z are all 2 characters long. Those two characters are hexadecimal numbers (numbers in base 16). This means that X, Y, and Z all range from 00 to FF.
X tells the amount of red in the color, Y tells the amount of green, and Z tells the amount of blue. FF is the maximum amount of that color, and 00 is the minimum amount. For instance, FF0000 is pure red, 00FF00 is pure green, and 0000FF is pure blue.
You can also mix colors. If X, Y, and Z are all the same, then it is a shade of grey. For instance, 000000 is pure black, 808080 is a medium grey, and FFFFFF is pure white.
If you do not make X, Y, and Z equal, it will just mix together the amounts specified for each color. For instance, yellow is a mix of red and green, so X is FF, Y is FF, and Z is 00. Therefore, yellow's code is FFFF00.
Here's an example. Let's say that you want to simulate someone talking in the chat. You would message the following string to a client:
<color:FFFF00>Mint<color:FFFFFF>: Hello. This will end up looking like a chat message.
EDIT:
To add on to that, this is the progression from 00 to FF:
00, 01, 02, 03, ..., 08, 09, 0A, 0B, 0C, 0D, 0E, 0F,
10, 11, 12, 13, ..., 18, 19, 1A, 1B, 1C, 1D, 1E, 1F,
...,
90, 91, 92, 03, ..., 98, 99, 9A, 9B, 9C, 9D, 9E, 9F,
A0, A1, A2, A3, ..., A8, A9, AA, AB, AC, AD, AE, AF,
...,
F0, F1, F2, F3, ..., F8, F9, FA, FB, FC, FD, FE, FF