Tell me the closest color, spread!

We are working with dmx for a few months already, and many times we need to use old equipment with color wheels… best case scenario would be variligth with cmy mix, but thats expensive

some time we need to chose a color to be send to 3 different equipments, rgb led, rgb moving heads, cmy moving heads, ( until here its easy ), and equipment’s with color wheels , and here is the problem

we know the array of 7 or 9 colors that we have inside the dmx ligth, and we have a color wheel that we can control to go to a specific color, so basicaly we need to make a node that,

from a fix color spread, and from a variable color, give us the closest color of that array to the given variable color. This took us a long time to think it, but with help of diferent users we were able to do it with the = node and the epsilon value.

But it only works for 1 color, now we want to do the same but with an array of colors ( let supose i have 12 ligths, all the same with the same color wheel, and i give the node 12 variable colors, i want to know the most similar colors of that array, and i want that in a spredeable node )

i attach what we have so far,

help color.v4p (62.0 kB)

Have a look

i have built this feature into my modules for the Martin Roboscans: