Finding range that separates series of numbers best

25 Views Asked by At

I have X number of colors (lets say, red, yellow, green) which have X measurements in R, G, B, H, S and I channel. In every channel I want to find the solution that separates the measurements the best. fx:

R channel

Red: [235 224 230 228 233 231]

Yellow: [155 145 153 157 152 148]

Green: [120 122 119 126 124 123]

...and similar in G, B, H, S and I channel

I want the output to be an interval around every color. Usually there are 25 different colors with +3000 measurements have.

How would I go about solving this issue?

BR Simon