Is there a way to separate colors from chained mix rgb nodes?
Here is a way that can help :



I dont consider here the way you are using this kind of ramp, but I have just focused on a way to obtain the ramp. So I did not wanted here to reproduce the way you are using the shader (only the ramp).

This "pseudoRamp" node group is a thread of several "rampMix" nodes groups (this node group can be reused to have more or less colors as inputs) :



And the role of each of them is to give a color between two (the previous color and the tested color) depending if the value is in between the values margins.

Here is the "rampMix" :



And the "rampMix" itself uses a "between" node group :



This last "between" node group needs to handle the limits of "lesser than", as it is strict ("&lt;" and not "&lt;="). So we cannot use "lesser than" with a "greater than" or we will miss the limit value.

Here is the blend file 

Note : this is not perfect at the limit, as you cannot downgrade the amount of colors (the last will stay last, but previous ones can overlap each other). So a little enhancement is needed for that.

Complement for the criss crossed aspect

The nodes described above can be mixed in order to make crossed color lines :

The first nodes on the left are here to modulate the amount of strips and are based only on the X, Y values in order to cross these axis only.