4 ms·
Well... color is physics though. Three spectra that our eye are sensitive to span a vector space dual to the space of all light spectra [1]. That space naturall
by Certhas 5y ago
Well... color is physics though. Three spectra that our eye are sensitive to span a vector space dual to the space of all light spectra [1]. That space naturally has a linear structure. You can have twice as much light of one color or the other, and you can add the light of different colors.
So there _is_ a natural interpretation of linear interpolation between two colors in physics. Concretely: Imagine two lamps with the two colors and the same brightness. You start with one fully turned up and the other fully turned down. Then you increase the one while you turn down the other keeping the brightness constant.
- fsloth 5y agoIMO gradients are not based on physics any more than selecting a smoothing curve in animation is. They are design tools - even though physics can be used to analyze them. I say this as a software engineer with a MSc in physics and a computer graphics/traditional graphics afficinado :) - not to boast with my eminence as that would be silly on this site but just that I've given a long and hard thought on this matter over the years.
- ricardobeat 5y agoSmoothing curves that look the most natural are often modeled after springs or friction. How is that not based on physics? Also, this argument makes total sense in isolation, but you still have no good reason for the gradient rendering on the web to stay as it is. It doesn’t look nicer or have any benefit other than backwards compatibility. This is the whole point of the article.
- BlueTemplar 5y agoI find that it's better to think of colors as imaginary rather than real - helps with some common assumptions, including how colors would be the same for everyone.
- fsloth 5y ago"Smoothing curves that look the most natural are often modeled after springs or friction. How is that not based on physics?" To be clear, when I say "based on physics" I mean "a value that can be computed from first principles, based on a specific model". For example the spectrum of a black body radiation can be said to be based on physics. Gradient is a mathematical entity. A "correct" gradient cannot be computed from first principles, nor does the article specify any specific model to use. There is no "correct" gradient. We can define some spec for a gradient and say "is according to spec" or "is not according to spec". Gradient is an interpolation between two triplets using some function. With gradient, in R3, we have two elements, a,b, and our task is to define a path g(t) from point a to point b so that g(0) = a and g(1) = b; The trivial way to do this is by way of linear interpolation g(t) = a * (1-t) + b * t however this has lots of aesthetic pathologies. The work around gradients is about finding the most pleasing g(t). If we start from the philosophical point of view that all smooth curves are based on intuition and inspiration from physics you are free to do so but this will summon an angry horde of mathematicians and computational geometry experts. "This is the whole point of the article." I think the point of the article was 1. Gradient rendering does not respect the spec 2. Any color computations should be done in linear color spaces The points are valid, but the motivational paragraph about gradients was more misleading than correct (IMO) hence my critical response above.
- deleted 5y ago[deleted]
- rocqua 5y agoColor is not physics, confusingly. The 'eye sensitivity response' mode is a color space. But it has problems. Notably, it can represent a lot of impossibly pure colors (because e.g. your red detectors have a lot of overlap with green so pure red acitivation is impossible). More relevantly, a linear interpretation of this system does not match what people see. Perceived brightness is close to logarithmic. If the cell has double the activation, that looks like a constant increase in brightness. Finally, the way we see color depends on the context, mostly the ambient light. This is largely (but not completely) captured by the idea of color-temperature / a white point. But there are also optical illusion effects around brightness and color.
- kloch 5y agoColor vision is much more complicated and “RGB” doesn’t work the way than most people think it does. The spectral response of the L and M cones mostly overlaps and our perception of color relies heavily on “adversarial” transformations in the brain. The result is a very different effective spectral response superficially resembling RGB bandpass filters except the red channel takes negative values (!) at some wavelengths: https://en.m.wikipedia.org/wiki/CIE_1931_color_space https://en.m.wikipedia.org/wiki/CIE_1931_color_space The negative values can be thought of as requiring additional anti-red (green+blue) to render the correct color. The CIEXYZ color space was invented to address the negative values and also conveniently separate luminance from color information. It is widely used today to do color space transformations since it represents standard human color vision in a reasonably convenient and intuitive way. On a side note, wide band RGB or Bayer filters used in digital cameras are a poor match for the CIE 1931 standard observer effective band pass filters (even ignoring the negative red values). They would result in low saturation colors if mapped directly to a full-gamut RGB colorspace. Conveniently or coincidentally they work well when directly mapped to a limited gamut sRGB color space. Narrower bandpass filters approximating the CIE1931 curves look correct when mapped to a wide gamut like rec.2020. The point is you cannot make simple assumptions about RGB colors at any point in the process. The biggest problem we have today however is many systems are not aware of colorspaces and assume that RGB values are an absolute and invariant encoding of color.