sRGB is a non-linear color space that's designed to encode color information for display on CRT monitors and enable low quantization of dark shades. It's not designed to be worked within.
sRGB is an "output referred" color space, which means it was specifically to display color. A "scene referred" color space is designed for manipulation of colors within the image.
Lab is a wonderful scene referred color space, but suffers from mathematical complexities that disables simple mathematical operations. The reason is that shifting a hue, for example, may describe a color that simply does not exist. (Think of it as divide by zero, but for colors.)
Then there are "perceptual" color spaces. Those are designed to enable simple mathematic relationships to produce color relationships that mirror our perception and expectations.
Oklab is one such color space that produces wonderful and quite harmonious color relationships:
https://raphlinus.github.io/color/2021/01/18/oklab-critique....
I assume that you're putting "correct" in quotes because you disagree with the idea that this is correct.
> The mathematics of harmonious color are fairly well understood...
Disagree. Human perception of color is highly nonlinear and we are constantly inventing new color spaces as tools to understand human color perception. These color spaces all have various tradeoffs and limitations. While useful, it's clear that our understanding is very limited.
> Lab is a wonderful scene referred color space, but suffers from mathematical complexities that disables simple mathematical operations. The reason is that shifting a hue, for example, may describe a color that simply does not exist. (Think of it as divide by zero, but for colors.)
(Note: Color spaces are neither "scene referred" or "display referred", so it is incorrect to call Lab "scene referred".)
This is true of various RGB color models as well. It is not unique to Lab. Many color models have this property because of the overlap between different receptor responses in the eye... it is fiendishly difficult to figure out a way to represent perceptible colors without including imaginary colors.
My conclusion here is that the only reasonable way to teach people how to pick harmonious colors is to have real humans use their brains and sense of aesthetics. Mathematical models for color perception tend to be either poorly suited for this task, or difficult to work with.
It is in quotes because it conforms to some definition of "correct", which is rather ambiguous, and because hue isn't the only factor of complementary colors.
> While useful, it's clear that our understanding is very limited.
I respectfully disagree. (Though acknowledge that our understanding of color is not complete.) I assert that our understanding of the mathematics of harmonious color are well understood because the spectral relationships are fairly straightforward. It's not uniform, like auditory relationships, but at least narrow-frequency relationships follow pretty simple patterns once the perceptual space is compressed. (Thus 180 degrees being "correct" complementary.)
The problem arises in our computationally-efficient matrices/transfer functions which distort those relationships and introduce the lightness and chromacity. I acknowledge, however, that it's not quite as "firm" as I phrased it.
> ...the only reasonable way to teach people how to pick harmonious colors is to have real humans use their brains and sense of aesthetics.
I agree that it's way better than shifting an HSL/HSV hue 180 (or however many) degrees to find a harmonious color. It's way more complex than that, and a proper tutor is much more valuable than an erroneous color space representation.
I definitely disagree with this. The relationship between color and spectrum is not straightforward.
Again, the human perception of color is complicated and nonlinear. We have made great strides sussing out that relationship with experiment, but when we discuss hue and relative differences, it becomes far more difficult to translate our experimental data on human color perception to some kind of useful model. The models have evolved over the years, from tristimulus models (based on the spectral response of photoreceptors) to more complicated nonlinear perceptual models (Lab and its successors), but as we work towards more accurate perceptual models, the models become more complicated and therefore more difficult to use and understand.
I am not trying to say this in order to be difficult--at one point I was working on image compression techniques and trying to create a perceptually uniform color quantization system. All models of color differences had noticeable limitations which made my work more difficult.
> Thus 180 degrees being "correct" complementary.
This assumes some kind of linearity in human visual perception which simply does not exist. You can do a hundred experiments showing that green light and magenta light mix to form white light, and yet this does not imply that they are complementary colors--the notion of complementary colors is only loosely related to the physics of light, just as color itself is only loosely related.
One line of questioning here is, "Is it reasonable to consider red and green to be complementary colors? If so, should our color space encode this relationship?"
https://www.hsluv.org/ https://www.boronine.com/2012/03/26/Color-Spaces-for-Human-B...
The color science is far from developed, and better models than HSV and CIELAB are available, but typically are very complex with little practical gain.
Why even bother teaching people about hue=(hue+0.5)%1.0 if the results are so ugly?
I agree that human-picked (where the human very often will be selecting in an HSV-based picker themselves) probably yields a more pleasing result more often (tastes can vary a lot there however), but I think there are some quite solid possibilities with code using HSV too, without having to go the whole-hog with colour-science. Makes it heaps easier to just play with colour for one thing, and code can be just for fun/exploration sometimes I think that's a good thing.
[1] https://en.wikipedia.org/wiki/File:Hsv-hues-cf-lch-hues.png
But yeah, that default cyan/red combination is incredibly garish.
If your notion of color theory is limited to RGB, then this might be reasonable. However, if you read the article that you linked (https://en.wikipedia.org/wiki/Complementary_colors) you'll see a much wider notion of complementary colors.
Let your eyes and sense of aesthetics be the judge... most will agree that the RGB red/cyan and green/magenta pairs are garish and ugly.