4 ms·
Why do all these color theory sites generate a complementary color just by flipping the hue 180°? I feel like the reason we do that is just because the math is
by klodolph 6y ago
Why do all these color theory sites generate a complementary color just by flipping the hue 180°? I feel like the reason we do that is just because the math is easy, not because these color combinations look good.
- Groxx 6y agoBecause that is complementary color, by color theory. Or, one kind of complementary color, anyway: https://en.wikipedia.org/wiki/Complementary_colors https://en.wikipedia.org/wiki/Complementary_colors . It's a purely computational process, no aesthetic taste is implied. But yeah, that default cyan/red combination is incredibly garish.
- klodolph 6y ago> Because that is complementary color, by color theory. 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 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.
- ansgri 6y agoBecause the hue scale was designed to be perception-based, so flipping by 180 is the intended use. Obviously a single formula cannot describe all complexity of human color perception, especially if you take into account spatial interactions and background illumination. 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.
- klodolph 6y agoThe hue scale is not designed to be based on perception. It is simply a polar coordinate version of RGB.
- hanche 6y agoEven that is an approximation: The hue is piecewise linear instead of using trigonometric functions. Linear, that is, in each 60° sector. (Or affine for the super pedantic.)
- danwills 6y agoThere's certainly a fair difference in difficulty between hue=(hue+0.5)%1.0, and doing things 'properly' (perceptually uniform spectral sampling? Sounds quite a lot harder tbh!). HSL and HSV certainly include compromises, but in many cases the utility of being able to work with colour represented in this way means they're still super useful, even if inaccurate.
- klodolph 6y agoWouldn't it be a lot easier to just ask a human to pick colors? By my reckoning, if you write a piece of code that's simple but generates garish colors, it's better to just pick out the colors yourself. Why even bother teaching people about hue=(hue+0.5)%1.0 if the results are so ugly?
- danwills 6y agoI do agree the colours in the article were garish, but I'd say that is less because of the HSV/L usage and more the author's choices (including choosing to make complementary colours in this way). The ability HSV gives to easily be able 'rotate' colour, (even though it's around a deformed blob nothing like a circle), and increase and decrease saturation makes it quite useful. 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.
- lifthrasiir 6y agoHSL and HUV would be useful for complementary colors if its hue is uniform enough. The problem is, they are not even that uniform. In some cases the complementary RGB hue can differ up to 30 degrees from the complementary CIELAB hue (which would be much closer to the true perceived hue) [1]. [1] https://en.wikipedia.org/wiki/File:Hsv-hues-cf-lch-hues.png https://en.wikipedia.org/wiki/File:Hsv-hues-cf-lch-hues.png
- covidthrow 6y agoFlipping the hue 180 degrees is "correct". The problem is that they typically use HSV which is based on sRGB and thusly results in incorrect complementaries. The mathematics of harmonious color are fairly well understood, but they do not align with sRGB's encoding, so the math is effectively broken. 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.html https://raphlinus.github.io/color/2021/01/18/oklab-critique....
- klodolph 6y ago> Flipping the hue 180 degrees is "correct". 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.
- crispyambulance 6y agoYeah, it's a bit disappointing. I know they're trying to come up with formulae to do this stuff, but color is a deeply subjective experience. You can have all the javascript machinery in the world, and it won't ever match quality with what visually trained folks can come up with using the artist Josef Alber's "Interaction of Color" theory.