The numbers are in order... Just not what you might consider a logical order (to the programmer it was)...
1 white
2 black
3 red
4 green
5 blue
(in the additive color model, all other colors are based on combinations of these)
6 yellow (red+green in the additive color model)
7 pink (red+blue in the additive color model)
8 turquoise (blue+green in the additive color model)
etc...