How to encode data with a feature having multidimensional features (colors)? My dataset has around 20 features, one of which is colors(in string format). There are around 50 different colors. I have converted them to RGB, but now I want to encode the data in such a way that the values are relevant, because I will cluster the data on this feature later on. To do this, one-hot encoding proved ineffective. Suggestions?
One-hot encoding will give you a sparse matrix, Try LabelEncoding, before converting them into RGB that is.

Also, you could try breaking the RGB values into three features (R, G, B) and try that approach as well.

Hope this helps.