w3c / png

Maintenance of the PNG specification
https://w3c.github.io/png/
Other
44 stars 11 forks source link

Measured but not perceived #414

Closed Myndex closed 6 months ago

Myndex commented 8 months ago

At the risk of being pedantic (hey I'm a risk taker...) in reviewing PR #412 I noticed the existing statement:

<p class="note">Luminance and <a>chromaticity</a> together fully define a perceived colour.

Luminance and chromaticity don't define a perceived color. At most these define a colorimetric color, or a "measured" color if we want to be as simple as possible.

Color perception is much too context sensitive. The simple fix is:

<p class="note">Luminance and <a>chromaticity</a> together fully define a measured colour.
jbowler commented 7 months ago

I second that. It's culturally sensitive. I do dispute @Myndex 's assertion though, along with the original statement. "Chromaticity" is, supposedly, a numeric description of a perceptual colour (subtly different from a definition thereof). Luminance is, as I understand it (I'm Not a Colour Scientist) presumed to be an independent variable.

The underlying problem, the elephant in the room as it were, is that very few people understand that colour is a purely perceptual phenomenon. Poynton did make the point; his famous green shirt (or was it blue?) Documenting it would be worthy but finding someone with the ability to write that documentation, in a way that real computer programmers could understand, would require money. I've only ever read one author capable of the task, https://isbnsearch.org/isbn/0691023867

simontWork commented 7 months ago

One speaker I've seen made the distinction that perceived qualities of colour were described using words ending in -ness, so brightness, lightness, colourfullness etc., whilst measured qaulities were things like luminance, chrominance, hue, saturation etc.

There's also a norm where the words luminance and chrominance are used for values in the linear domain, once gamma (or another transform function) is applied, they change to luma and chroma.

Myndex commented 7 months ago

Hi John @jbowler

I do dispute @Myndex 's assertion though, along with the original statement. "Chromaticity" is, supposedly, a numeric description of a perceptual colour

By chromaticity, we typically are referring the xy coordinates on the chromaticity diagram, the outer rim of which is the spectral locus, which presumably defines the extent of the human gamut of color vision.

The values were derived from matching experiments, wherein subjects looked at a test target, half of which was a defined monochromatic color, and the adjacent half was a color created by mixing three "primary" lights (red green blue). The subject would adjust the primary light intensities until a visual match was achieved such that the left and right half of the visual target were indistinguishable.

Thus, chromaticity coordinates refer to a tri-stimulus match to a "pure" color in an isolated environment, with no other context.

The $CIE\ XYZ$ space provides coordinates wherein $X+Y+Z=1$, and $Y = luminance$.

In the diagram below, the $XYZ$ space is projected to create this $xyY$ space, where the chromaticity is the $xy$ coordinate on this chart, and the $Y$ is luminance (not shown).

CIE1931xy gamut chromaticity diagram by Myndex Research v05 P3 sRGB With CMYK

Thus, luminance $Y$ and chromaticity $xy$ fully define a measured color.

Color perception is different. Color perception implies the perceived color in the context of specific lighting and other colors of the design or environment, and not in isolation, and not in terms of "matching to find a null".

svgeesus commented 6 months ago

The underlying problem, the elephant in the room as it were, is that very few people understand that colour is a purely perceptual phenomenon.

Right. For example I could measure a color with a spectrophotometer, and give you a table of measured intensities at 10nm spacing from 700nm to 400nm and say "this fully defines the color, and I measured it". In that case I would be right; and someone else might then compare it to another, very different table of intensities and say "this is very different, so it is not the same color". But to find out if it is the same color or not we need the table of X Y Z weighting functions, which are derived from experiments on human color perception. We then multiply each measurement by the corresponding X Y or Z value and sum, which gives us the XYZ value of the color (and thence, the xy chromaticities) and if those are the same (and the requirements for Grassman's laws are met) then they are the same color even if the spectra are very different.

On the other hand I could take, say, a photographic light meter which is designed to evaluate the color temperature of white, and measure it. But unless the color is a close approximation to some shade of daylight white then my measurement is worthless and does not define the color.

"Chromaticity" is, supposedly, a numeric description of a perceptual colour (subtly different from a definition thereof). Luminance is, as I understand it (I'm Not a Colour Scientist) presumed to be an independent variable.

The perceived color measurement is in XYZ, and chromaticity simply factors out the luminance Y:

let sum = X + Y + Z;
let x = X / sum;
let y = Y / sum;
// we don't need z because z = 1 - x - y

and so, given x,y to get back to XYZ you also need the luminance, Y, which is indeed an independent variable.

On balance, avoiding the impression that Y xy defines color appearance is probably more important than avoiding "we don't usually need spectral data to define a color" so, given that this is a loose introduction not a color science textbook, I am fine with the change suggestion of @Myndex