A colorspace is basically a way to model colors to attributes. The well known RGB colorspace maps colors to Red, Green and Blue.
If that space has three attributes, we can view them as coordinates on a 3D space (Any n attributes can be viewed as an n-dimensional vector space). Then we define color distance as the usual Euclidean distance we use for tangible stuff in the real world.
A uniformly perceptual colorspace aims to have the following identity: “identical spatial distance between two colors equals identical amount of perceived color difference”. The actual definitions of those terms can be found in color science books and research.
Oklab is a perceptual color space designed by Björn Ottosson to make working with colors in image processing easier. After reading the introductory blog post, I wondered if I could apply it to finding dominant colors of an image.
Terrible. Obviously the approach can’t work with multiple colors apparent in a picture. If the picture was mostly one color it’d be somewhat useful: