• There's something that tends to go unrecognized, a function of the way our monitors work. Any color that is made of multiple primaries, such as magenta, cyan, or yellow, will naturally be brighter because more photons are emitted from the display. Not twice as bright, since our eye response is non-linear, but noticeably brighter.
    • Yup. This is precisely why the first image seems to have oscillating brightness, with clear sharp peaks at yellow and cyan. It's because it's not just changing color, it's literally twice as much light. It goes:

        Red - 1x
        Yellow - 2x
        Green - 1x
        Cyan - 2x
        Blue - 1x
        Magenta - 2x
      
      (Of course magenta is not part of the spectrum.)

      A very first step towards a better spectrum is just to maintain constant output brightness (accounting for gamma). There will still be perceptual differences in brightness, as we naturally perceive green as brighter than blue.

      Obviously this gets taken into account by the time the author gets to the CIE color model. But there are a number of "intermediate" improvements like that, which you can make.

    • Most monitor reviews I've seen measure levels for black, white AND grey.
  • > The final piece of the puzzle is gamma correction. Applying gamma correction to these RGB coordinates produces a new set of values which we call (R', G', B') that are related to the original by a transfer function 6 ... The reason this is done is to account for how our eyes perceive brightness nonlinearly. We can distinguish changes in dark shades much more easily than light shades because a linear increase R in has much more of a relative effect when R is small. Switching to (R', G', B') therefore provides more resolution in dark regions of the image where the eye is more sensitive to variations in brightness.

    I'm surprised that this isn't mentioned much earlier and much more prominently. Instead, it's practically a footnote.

    Maybe I'm mistaken, but I would bet 90% of the awkwardness in the very first image is from averaging these values (R', G', B') for the gradients rather than switching to the true linear values, averaging, then converting back. This classic MinutePhysics video covers it well:

    https://www.youtube.com/watch?v=LKnqECcg6Gw

    • Probably the biggest distortion in the first image comes from ignoring output brightness:

      https://news.ycombinator.com/item?id=47047866

      Next I'd guess is correctly mapping wavelength to raw RGB ratios, and then third would probably be gamma.

      Since that would be the "good enough" approach for most people, I wish a could see a comparison of that with the author's CIE-based results.

  • It is very interesting that whereas an incandescent lightbulb and a white LED (e.g., that Macbook screen) appear to us the same colour, their underlying spectra are very different (a solid black body radiation spectrum from the former and a choppy one from the latter).

    I vaguely recall this is also known to cause a phenomenon where certain material can appear a false colour under certain light (especially a problem in case of, say, physical paintings and their various pigments), if whatever bands it reflects would align with the spectrum of emitted light in an unfortunate way.

    (NB: even though the topic is relevant to his field of work, the author of the paper is not the digital videographer and YouTuber Brandon Li.)

    • Metamerism is closely related topic: https://en.wikipedia.org/wiki/Metamerism_(color)
    • I miss the low-pressure sodium street lights that used to be ubiquitous in Britain. The light was virtually monochromatic, which created a very specific aesthetic at night. Modern white LEDs feel more like a bad approximation of day rather than embracing the idea night should look different I think.

      LEDs are much more flexible with colour anyway, we should have tried to keep some visual continuity rather than going straight for the harsh high-K white in my opinion.

  • > The right approach would have been to select a color appearance model (CIECAM02 is the standard), convert all our colors to this coordinate system, do the mixing in this coordinate system and then convert back to RGB. That being said, I did not want to deal with all the extra complexity that would have come along with this. Instead, I opted for a much simpler approach.

    Python's nice `colour` package supports several color appearance models.[1]

    [1] https://colour.readthedocs.io/en/master/colour.appearance.ht...

    • But I'm glad for the ground-truthy approach taken. I suggest a pattern, of interesting data being unavailable, because it doesn't align with incentives around science or commerce. Often it exists, just sitting on someone's disk, because they think no one is likely to care.
  • These wavelength-indexed spectra always seem a bit weird... the blue is so cramped! When you plot them by frequency they feel just right. We say "ultraviolet" and "infrared" for a reason; never "infraviolet" or "ultrared".

    It's like a piano that had the high notes to the left.

  • > we write the color associated with a spectral distribution as C[S] where C is the function that takes a distribution and outputs the corresponding color.

    Unrelated, but can anyone tell me the purpose of using the square bracket notation here, instead of the usual parentheses?

    • Square brackets are often used in contexts where the function is "higher-order" in some sense, with the type of the parameter itself being a function, distribution, or a similar object with richer structure. I think in this case C[S] is particularly supposed to evoke the expected-value notation E[X], because that's what C[S] essentially is – it gives the expected value of S if you interpret S as a random variable with that distribution.
  • One thing peculiar about the final image is how desaturated it is. It doesn't actually represent the spectrum, which is by definition the pure, fully saturated colors. It's rather a gradient of a bunch of desaturated hues. For example, where is pure yellow on this gradient?
  • Very well put together set of fidgeting. I really appreciated the addition of the P3 color space sample at the end. For seeming like such a small addition in terms of area on the chromaticity diagram the extra stretch at the extremes goes a really long way.
  • I would say that most depictions of the visible light spectrum on the internet, and in textbooks, are not for physicists, but for "average" folk who simply want the gist of the visible light spectrum. Most of us don't need the exactness the author provides in his write up.
  • This doesn't account for Tetrachromacy does it

    https://en.wikipedia.org/wiki/Tetrachromacy

    It would be interesting to learn more about colours spaces developed with Tetrachromacy in mind. I guess the rest of us should be classed as visually impaired.

  • is nobody going to comment on the fact that this page seems to be written entirely in latex?
  • Interpolate between the spectral color and gray for existing distortion.

    Designating 460nm blue in terms of the Abney affect to render a realistic spectrum.

  • Screw, me, I was reading the title as "Rendering the Vibe Spectrum". I clearly need a break.