For eg.
I have 3 colors.
color1 = UIColor(red: 142/255, green: 165/255, blue: 94/255, alpha: 1)
color2 = UIColor(red: 141/255, green: 114/255, blue: 96/255, alpha: 1)
color3 = UIColor(red: 214/255, green: 194/255, blue: 149/255, alpha: 1)
Is it possible to identify that color1 is closest to color2 and not color3 in swift and then make the necessary adjustments to color1 such that color1 == color2?
If you compare color1 and color2, you can see that they are of slightly different shades but are very very similar.
can I compare merely based on RGB values or do I have to use hex values?
Thanks