The Amazing Math behind Colors!

169,475
0
Published 2022-08-12
In this video, I talk about the math and science of colors for 42 minutes. Topics include cone cell response functions, electromagnetic radiation, spectral colors, luminance, color spaces, parametric equations, normal curves, mono and polychromatic light, emission spectra, spectral power distributions, chromaticity diagrams, linear transformations, the physics of diffuse reflection and light sources, blackbody radiation, sunlight, refraction, rainbows, rayleigh scattering, fluorescence, LEDs, color gamuts, CRT TV, LCD screens, CMYK printers, the RGB cube, binary, hexadecimal codes, the HSV color space, cylinder and cone, and color schemes. This is my entry in #SoME2

Corrections/Clarifications:
37:10 I misspoke and said m1 instead of m2. What is shown on screen is correct.
22:12 On screen it says λ = f/c, but this is wrong. The correct formula is λ = c/f
I have been told by some commenters that the long cone responsivity graph has a smaller, secondary peak, in the shorter wavelengths, and this is a reason why monochromatic violet appears more red than a pure blue. I have found conflicting information on this though. Either way, the way the brain interprets colors is extremely complicated, involving something known as the opponent process.
en.wikipedia.org/wiki/Opponent_process

Intro song: 1812 overture by Tchaikovsky (specifically the U Vorot Vorot part)
Outro song: Waltz of the Flowers also by Tchaikovsky

Chapters:
0:00 Intro
1:04 Cone cells
5:10 Spectral colors
8:20 Color spaces
13:34 Polychromatic light
16:13 Chromaticity diagram
21:09 Physics of reflection
23:25 Blackbody radiation
26:58 Luminescence
28:42 Computer Screens
30:58 Printers
32:28 RGB cube
35:23 HSV color space
40:00 Color schemes
41:46 outro

All Comments (21)
  • @rsa5991
    There is one important thing, that is easy to miss: the values 0..255 in "RGB" are not true RGB values - they are square roots of RGB values! That means, that the "middle" value of 128 is not 50%, but only 25% brightness. If you mix colors in that non-linear "RGB", you'll get darker colors, than they should be! The reason for that is CRT monitors, that had quadratic response to input voltage. To save money on consumer side, they decided to put correction on the production side. Also, human perception is more sensitive to darker colors, so it was also a kind of proto-compression. This is the #1 mistake of programmers, who work with colors - it has even snuck in a common software, like browsers. If you mix two RGB values, you should always square them first, mix, and then sqare root them. * To be exact, they are not even square roots, they are 2.2-degree roots.
  • @gregmark1688
    The very moment I was thinking "Is he going to leave anything out?" you broke out an explanation of converting hex to decimal. It just doesn't get any better than this.
  • This is probably the best explanation of color on the internet. And believe me I've watched/read so many. But none of them answered all the questions I had about color vision and color spaces as clearly and as detailed as this one. Brilliant. Looking forward to watching the rest of your stuff!
  • @PeterHarveyUK
    I am approaching the age of seventy. I have found myself confused over the course of my conscious life by every account of colour that I have ever come across. This is the very first account of colour which I have found comprehensible. It is the best thing on the subject I have ever seen. I learned an immense amount from this video, the conistent quality of which astonishes me. I salute you, Kuvina Saydaki. Thank you, thank you, thank you!
  • @athko
    this is so well made :D
  • @chair547
    I've heard claims floating around that you can see invisible Colors by abusing the fact that when neurons fire too often their outputs are ignored by the brain. The idea is, for example for hyper green you can stare at a red image for a long time until the neurons that carry short cone information are deactivated and then quickly switch to a green image while those neurons are still deactivated and that will let you see hyper green but I don't know how true it is
  • @Kavukamari
    ive been reading stupid scientific papers about CIELAB and all these color spaces for months but this is the first time ive genuinely felt like i had an intuitive understanding on this topic. Thank you.
  • @ace4x3
    I'm so happy this got recommended to me. This video is criminally underrated!! The quality is insane. Thank you for making this. It was a very interesting watch. You have a very good sense for explaining things :D
  • @ebux9885
    im supposed to study wtf am i doing here
  • @MrApolloTom
    A really excellent video. As a painter I would like to add a bit about subtractive mixing. C, M, and Y are a good compromise set of primary subtractive colours but don't really make the definitive three primaries in the same way that additive primaries do. One reason is that when they're mixed, there's a loss of saturation, so while you can make a version of every hue with CMY, you can't mix every colour at full saturation. For this reason painters will often choose different primaries in their palette. With orangy red and a yellow you can make a more saturated range of oranges, but won't be able to make a strong purple with the red. With magenta, yellow, and an ultramarine blue you can make a better range of strong purples than CMY but only a duller orange or turquoise. The second issue with subtractive mixing is that you get the wavelengths that the two primaries share in common. If you had a hypothetical red pigment that reflected a pure red wavelength only, and an equivalent blue, they would mix to black! But you could have a red and a blue that look exactly the same to the eye, but that reflect more of a mix of wavelenths. These would mix to a purple of some sort. The conclusion is you can't predict exactly how subtractive pigments will mix just by their visual appearance! Thanks and best wishes, Tom
  • This is single handedly the best, most robust, comprehensive and informative video about colors in all of the internet! I hate that the algorithm took 10 freaking months to bring this to my feed! I was geeking out throughout the whole thing. The marriage of the topics of arts (color), physics (waves), biology (perception), chemistry (pigments), astronomy (stars), computer science (hex & HSV) and math has never been this seamless and well connected in any video I've encountered. It clearly shows how much you yourself have been intrigued in these topics and how much you've thought about the relationships between it all, and as someone with shared interests, I literally turned into the neuron activation and pointing rick dalton memes every other minute. Not only that, but every time you went onto a small tangent, you made sure to sprinkle in a "well, no, actually" and proceeded to make the viewers informed about the intricacies of the tangent instead of simplifying it too much and moving on. (For example, fact about responsivity and normalized was new to me. And also Newton taking a dumb liberty + supernumerary bands forming purple. And also how Sun's spectrum isn't ideal due to non-uniformly traveling light.) Absolutely outstanding job! If I were to provide some suggestions, the first would be at about 11:45 where you start introducing colors (purple) outside the curve. You could've sprinkled in stuff like how the light waves, the conversion of light to signals, and the interpretation of signals to color are independent phenomena. Meaning, the brain doesn't care whether it is sensing 'light', but only that it's receiving some kind of 'signal' about the environment. Consequently, if the brain is receiving a signal that peaks at the short and long cones, it will find a way to interpret that as well. But how would the eye even manage to sense receive light that simultaneously triggers both cones if all the wavelengths in the visible spectrum only trigger colors in the curve? And the answer to that would your explanation for monochromatic and polychromatic light. I think it would be a great transitional segment to your excellent presentation. There's nothing wrong with your explanation. It's just that as someone who has studied this topic, I can fill in the gaps with my own knowledge, but a beginner might not. I think it would be cool to let viewers know that not only are colors non-existent/imaginative in nature, but also that the color purple quite literally doesn't even exist! Like, it's not even an interpretation of wavelengths by the brain but something the brain just made up! cue exploding brain The second suggestion would be at 30:10 where you brush over the luminance part. I am personally not well-informed about the details in this specific part, so I just accepted it as is. A bit more could've been nice. And also about how light polarization is utilized in LEDs. Anyways, this comment is long enough and you probably won't even see it. I just wanted to express my appreciation for the work and informative quality you've put into this video. You've made my day!
  • @LumenPlacidum
    For years I gave a project to my Linear Algebra classes to research and describe how vectors and linear transformations have to do with supposed "color spaces". Congratulations! You've beaten them all 😂. This is officially one of my favorite videos on YouTube.
  • @PeterNerlich
    This is so amazing, I'm not even halfway through but this is exactly what I need. I've been learning a lot how to think about colors not only in RGB/HEX values for websites but for print over the last year, but I knew I was missing some solid fundamentals. I'm at the CIE 1931 xy Cromaticity Diagram right now, I think once I reach the end of the video I'll be totally enlightened :D
  • @AJMansfield1
    This is an excellent introduction to color math! I would love to see a part 2 to this as well, covering things like Color Rendering Index (CRI), perceptual color spaces (CIELAB, HSLuv, etc), and the different types of colorblindness. Colorblindness especially is something that's often misunderstood as a complete lack of color-processing ability, where in the most common forms just have a slight shift in the response curves for M cones (as in deuteranomaly) or L cones (as in protanomaly) so they overlap way more -- effectively, making the red-to-green side of the chromaticity chart "shorter".
  • @lishlash3749
    Excellent analysis of chromaticity and RGB color theory, which explains the physiological response of the eye to visible light. For your next project, I'd suggest an exploration of Opponent Color Theory, which explains the brain's psychological response to color and the phenomenon of metamericism. Briefly, the optic nerves between the eye and brain combine the RGB components from the cone cells into sum and difference vectors which the brain interprets as a pair of orthogonal color axes: a red-green axis and a yellow-blue axis. Each distinct area of color in the visual field is mapped into a position on each axis according to its chromaticity relative to its perceived background. These two-axis coordinates are interpreted by the brain as the metamerical hue of each perceived area of the visual field. Opponent color theory explains how different RGB combinations can produce the perception of the same psychological hue. Also why we can perceive shades such as greenish-blue and reddish-purple, but not yellowish-blue or greenish-red.
  • @PretzelBS
    Literally everything you could ever want to know about colours. Now I wanna build flashlights with specific wavelengths and combine them to see the forbidden colours
  • @DaveDomonoske
    This is an unbelievably high quality video. Thanks.
  • @jacksong8748
    Wow, this video really unified my understanding of color! Not just on screens, but in general. The explanations of the relationships between the ways we represent and model color were succinct and clear. I came in with a decent grasp of most of these concepts, but this really drove home the connections between them all, thank you!!
  • This is so good. You don’t know how many times I’ve tried to fully understand a chromaticity diagram. Well done!
  • I had no idea this was gonna be so interesting!! Really great video covering so many different topics in that intersection between your passions of math and color!