I am working on my final bachelor's project in computer science, and while I'm at a standstill. Here is what I am stuck:
I am trying to classify any color (rgb code) in any of 8 (eight) simple colors. In short, I need to find 8 intervals where any color can be placed and considered the main color (red, blue, green, black, yellow, purple, gray, brown).
example:
(18,218,23), which will be classified as "green"
(81, 214.85) also "green"
but
(15,52,16) must be black
(110,117,110) should be gray
So there are 256 x 256 x 256 possible colors, and I need to divide them into 8 (intervals) primary colors.
I am waiting for some suggestions.
Greetings!
To be clear (as I saw in the comments), I am looking for a specific set of 8 colors (red, black, green, brown, blue, purple, gray, yellow). Sorry for the orange above!