Live data from Hacker News

Issues with color spaces and perceptual brightness

johnaustin.io

21–30 of 67 posts

Re: Issues with color spaces and perceptual brightness

#21
post #12

Earlier quoted context omitted.

That, or the more recent darktable UCS: https://eng.aurelienpierre.com/2022/02/color-saturation-cont...

Someone else was mentioning Oklab color space, and I was wondering what the difference was to darktable UCS. TL;DR: Oklab is pretty simple, but is already pretty nice as a perceptually uniform color space. Darktable UCS takes Oklab and tries to reduce the residual error. Feel free to correct me if I got anything wrong

Not sure. The article is long and I only skimmed it, but what stood out to me were the following paragraphs:

"After trying to fix Oklab for a dozen of hours, it appeared that the numerical issues it raises are grounded into design constraints we don’t need for the current task. And so do most of the other perceptual spaces.

[..]

So we could fit an Lch model directly from Munsell hue-value-chroma dataset, without going through LMS space and without even tilting the lightness plane. Doing so, we will not try to model the physiology of vision, but approach the problem as a geometric space distortion where the Munsell hues and the saturations (as a ratio of chromas / values) can be predicted by a 1D mapping from the hues, chromas and lightnesses of forming the principal dimensions of the model.

This model will need to be invertible. We will try to fit brightness data to derivate correlates of perceptual brightness accounting for the Helmholtz-Kohlrausch effect. Using the brightness and saturation correlates, we will rewrite our image saturation algorithm in terms of perceptually-even operators."

They obviously took a lot from Oklab but it seems to me they did more than just modifying it to reduce the residual error. But again, I just skimmed and I can be completly wrong.

Re: Issues with color spaces and perceptual brightness

#22
post #18

I've always found these "perceptual vs absolute" things about human senses very interesting. Hearing has a few quirks too: - When we measure sound pressure, we measure it in log (so, every 3dB is a doubling in sound pressure), but our hearing perceives this as a linear scale. If you make a linear volume slide, the upper part will seem as if it barely does anything. - The lower the volume, the less perceivable upper a…

I can't remember the last time I saw a "loudness" button. My receiver from 1980 had one but my receiver from 2000 does not.

Re: Issues with color spaces and perceptual brightness

#23
There's another problem nobody ever talks about. The way our RGB monitors work, some colors will be more intense than others at the same brightness. A red or blue patch will only emit half as many photons as a magenta patch, because magenta includes both red and blue. The non-linear response of the eye helps here, but not completely.

Re: Issues with color spaces and perceptual brightness

#24

> This process means that there is some error. For example, ideally, a color with L=50 looks twice as bright as a color with L=25. Except, with very strongly saturated colors like red, this isn’t actually the case in any of these color spaces. A benefit of doing it this way is you account for color blindness and accessibility e.g. all colors at L=50 will have the same WCAG contrast ratio against all colors at L=25. T…

I've found the WCAG contrast ratio to be almost worthless. Unless you have a legal requirement to use it, I'd stay away.

Re: Issues with color spaces and perceptual brightness

#25
post #22
post #18

I've always found these "perceptual vs absolute" things about human senses very interesting. Hearing has a few quirks too: - When we measure sound pressure, we measure it in log (so, every 3dB is a doubling in sound pressure), but our hearing perceives this as a linear scale. If you make a linear volume slide, the upper part will seem as if it barely does anything. - The lower the volume, the less perceivable upper a…

I can't remember the last time I saw a "loudness" button. My receiver from 1980 had one but my receiver from 2000 does not.

My 202x LG sound bar has 8 sound modes ("Music with MERIDIAN", or "Get in the zone during your game with vivid sound effects", ...). Who knows what any of them do, but presumably one of them corresponds to the loudness button.

Re: Issues with color spaces and perceptual brightness

#26
post #18

I've always found these "perceptual vs absolute" things about human senses very interesting. Hearing has a few quirks too: - When we measure sound pressure, we measure it in log (so, every 3dB is a doubling in sound pressure), but our hearing perceives this as a linear scale. If you make a linear volume slide, the upper part will seem as if it barely does anything. - The lower the volume, the less perceivable upper a…

A 3dB increase is a doubling of a power quantity, but you need 6dB to double a root-power quantity (formerly called a field quantity). Sound pressure is root-power quantity:

https://en.wikipedia.org/wiki/Power,_root-power,_and_field_q...

Consider a loudspeaker playing a constant-frequency sine wave. Sound pressure is proportional to the excursion of the cone. To increase sound pressure, the excursion has to increase, and because frequency is fixed the cone will have to move faster. If it's covering twice the distance in the same time interval it has to move twice as fast. Kinetic energy is proportional to the square of velocity, so doubling the sound pressure requires four times the power, and doubling the power only gets you sqrt(2) times the sound pressure.

Human loudness perception generally requires greater than 6dB increase to sound twice as loud. This depends on both frequency and absolute level as you mentioned, with about 10dB increase needed to double perceived loudness at 1kHz and moderate level.

Re: Issues with color spaces and perceptual brightness

#27
post #18

I've always found these "perceptual vs absolute" things about human senses very interesting. Hearing has a few quirks too: - When we measure sound pressure, we measure it in log (so, every 3dB is a doubling in sound pressure), but our hearing perceives this as a linear scale. If you make a linear volume slide, the upper part will seem as if it barely does anything. - The lower the volume, the less perceivable upper a…

I have a theory that this generalizes to some extent.

Pitch perception is also logarithmic; an octave in music is a 2x ratio.

Memory is sort of logarithmic; you'd say a thing happened 1-2 days ago or 1-2 years ago, but not 340-341 days ago.

Same with age; someone being 10 years older than you is a much bigger deal when you're 10 than when you're 80.

Re: Issues with color spaces and perceptual brightness

#28
post #23

There's another problem nobody ever talks about. The way our RGB monitors work, some colors will be more intense than others at the same brightness. A red or blue patch will only emit half as many photons as a magenta patch, because magenta includes both red and blue. The non-linear response of the eye helps here, but not completely.

This is the main reason why CIELAB was developed

Re: Issues with color spaces and perceptual brightness

#29
post #24

> This process means that there is some error. For example, ideally, a color with L=50 looks twice as bright as a color with L=25. Except, with very strongly saturated colors like red, this isn’t actually the case in any of these color spaces. A benefit of doing it this way is you account for color blindness and accessibility e.g. all colors at L=50 will have the same WCAG contrast ratio against all colors at L=25. T…

I've found the WCAG contrast ratio to be almost worthless. Unless you have a legal requirement to use it, I'd stay away.

Why worthless? I'm not saying it's perfect, but isn't it a better-than-nothing guide? If you've got good eyesight, it's not always intuitive which colors have good contrast. If WCAG says the contrast is bad, it's probably bad (but there are known exceptions where it gets it wrong).

https://www.inclusivecolors.com/ includes the APCA contrast measurement which is meant to be more accurate than WCAG, if you want to experiment with how it compares.

WCAG and APCA mostly agree on what has good vs bad contrast for dark on light color pairs with some exceptions. For light on dark colors though, WCAG isn't accurate and ACPA is much stricter in what's allowed.

Re: Issues with color spaces and perceptual brightness

#30
post #7

If this submission has put you into a mindset of wanting to know more about colormaps, here's a good video about how Matplotlib ended up having `vividris` as its default colormap: A Better Default Colormap for Matplotlib | SciPy 2015 | Nathaniel Smith and Stéfan van der Walt https://www.youtube.com/watch?v=xAoljeRJ3lU

Available in several formats at http://seaviewsensing.com/pub/cpt-city/mpl/
Post reply on HN