What is a good color similarity metric? I have some colors in RGB in [0,1] and want to find a way to rate their similarity, as perceived by a human.

I have two ideas in mind, but I am sure there are other options as well, but am unsure which is best, or if perhaps there is no best, but only trade offs.

My first idea is to treat the RGB colors as XYZ points and calculate their distance.

Another idea I have is to treat the RGB values as a histogram and use dot product to get a similarity value between them, where a larger value is better.

I know however, that not all of the color channels have the same perceived brightness so maybe I ought to weight the color channels differently for both cases?

I'm also thinking I perhaps would need to do sRGB correction on the color values (such as, sqrt each color channel).

I also know other color spaces exist, so maybe one of those would be better at giving a similarity value.

Another challenge to this may be that different displays will display the same color values differently.  Not sure if that's relevant in this case.

Anyone able to provide some help/direction?
If complex metric is acceptable I would suggest to look at perceptual based approach described here. The metric is designed to pick perceptual difference of two images. There are two main tests for that : luminance based and color based. First one allows to answer the question how important luminance change is by estimating a non uniform threshold factor based on sensitivity to contrast changes depending on spatial frequencies of the image. The second one is based on euclidean distance in CIE LAB color space, but slightly modified to make color difference less important when luminance is in mesopic and scotopic ranges. A list of papers related to that metric can be found here.