"Like colors" would be to put the blues together and the reds together, and so forth.
Your current script create four sets of like colors instead of one..
In other words.. is it possible to generate the colors to follow the color spectrum so that all like colors are grouped together (greens with greens, reds with reds, etc.)?