The Amazing Math behind Colors!

268K views · 4 years ago · explainer · evergreen

Kuvina Saydaki's roughly 40-minute explainer on the math behind color, covering how color mixing works and why a better color space than RGB is needed. It is dense but aimed at a general audience.

HN people call it the best and most comprehensible take on color mixing and color spaces, and recommend it despite its length.

“it's the best and most comprehensible take on the subject”

4 comments from Hacker News

z
@zeroq2025 · in “A visualization of the RGB space covered by named colors”
Honestly I haven't read the whole thread but I think your mixing stuff like green and blue being called the same word in some languages or ancient greek completely missing word for blue. What I was thinking is along the lines of showing a real life scene to ten random people - like a view of a city park outside of an office window - and then showing them a picture of said scene on a computer screen using only 256 colors (quantization) and asking them if it looks the same. Or modeling a 3D photo realistic scene of a room in a video game and then switching off the light and asking the player if the scene still looks realistic after we changed the colors or did we stumbled into uncanny valley. The simplest, hands on experiment, I can think of is putting yourself in shoes of an oil painter and thinking about creating a gradient between two colors, let's say blue and green (or any other pair, it doesn't really matter). Now try to imagine said gradient in your mind and then try to recreate it with graphical program like Photoshop. If you went down this route the gradient will seem odd. Unnatural. All common standards we were commonly using for the last 30 years like RGB, HSL, HSV, etc. falls flat. They are not so much off to call them "uncanny" (as in "uncanny valley"), but they seem wrong if you look close enough. To actually simulate mixing two blobs of an oil paint you need arcane algorithms like Kubelka-Mink (yet another ground breaking discovery in IT made by reading a 100 years old research). All in all - take a look at this video, I know it's 40 minutes long, but this topic has been a peeve for me for almost 20 years and it's the best and most comprehensible take on the subject: ▶ this video
Strongly recommendsView on HN
z
@zeroq2025 · in “The 12-bit rainbow palette”
Short answer - RGB is really convenient for lighting up sub pixels on your LCD screen, but it's utterly terrible at conveying information about relation between colors. HSL is a clever hack to quickly answer which color is slightly dimmer or brighter than this color, but again, it's quite terrible at conveying information about difference between colors. I encourage you to think about two random colors and imagining a gradient between them and then drawing said gradient in RGB and HSL color spaces. In both cases it will be wildly different from what you'd expect or could create with two blobs of oil paint on canvas. Long answer - unfortunatelly it's quite hard to convey why we need a better color space in twitter-space but this video (while 40m long it's quite condensed) is an excellent explainer: ▶ this video
RecommendsView on HN
l
@larion12023 · in “The Math Behind Colors”
Submitted the video to Hacker News.
RecommendsView on HN
z
@zeroq2025 · in “The 12-bit rainbow palette”
This is nice, and works really nice for her use case! Two things to note when thinking about color schemes: (1) dr. Cynthia Brewer spent way too much time developing the color scheme for maps with information and similar inforgraphics. I can't find the document at this time, but was a lecture long explanation about how she got them. (2) designers often use "sacred geometry" bullshit like "golden ratio", PI, Phi, and such to explain their thought process. The most common way to create a color palette is to use opposite colors, "triads" and "tetrads". All of this is based on color wheel in HSL/HSV. Which is almost as bad at describing relation between colors as RGB. [2] PS. my pet peeve for a long time was trying to understand why most color quantization algorithms were relying on finding the distance between RGB colors in 3D space (by mapping RGB components to XYZ coordinates) while it's obviously a terrible way to reason about color relationship. PPS. a random dude with a similar interest but way more dedication (re)disovered a work by Kubelka and Munk from 1931 describing an algorithm how to properly mix colors and based on that created an incredible graphics program that allows you to paint just like in real life - with oils and watercolors on canvas! [3] [1] link [2] ▶ this video [3] link
CitesView on HN