How to bin Colour values (categorical- high cardinality) to primary colours? I have a colour variable with values for different e-commerce products like - olive, teal, blue, green etc.

I want to bin these colours to the primary colour values.

eg - 

olive ---&gt; green
teal ----&gt; blue
blue and green will remain the same.


I also have images available of these products, therefore, I am wondering if there is any solution using some clustering technique or using a pre-trained model for classification in some way.
Since there are small, finite number of color options, it would be straightforward to manually create a dictionary where the key is the primary color and values are a set of other color values.
In Python, it would be something like:
colors = {&quot;blue&quot;: {&quot;blue&quot;, &quot;teal&quot;},
          &quot;green&quot;: {&quot;green&quot;, &quot;olive&quot;},
         }