Matching and measuring

Matching is not appearance

CIE XYZ predicts when two lights will look the same under identical viewing conditions. It was never a model of how anything looks, and most of the confusion in applied colour comes from using it as one.

The CIE system answers one question, and answers it very well: given two lights, will an observer report that they match?

It does not answer the question everyone wants answered, which is what either of them looks like. The gap between those two is where most practical colour problems live, and the habit of treating a colorimetric value as a description of appearance is the single most productive source of confusion in the field.

Two identical grey patches on different surroundsBoth inner squares are #868686. The one on the dark field looks lighter. The values are asserted equal in code before the figure is drawn, so the claim is a fact about the drawing rather than a promise.on a dark fieldon a light fieldboth patches are #868686asserted equal
Fig. 1 Two patches with identical colorimetry. Identical XYZ, identical Lab, identical everything the measurement system reports — and plainly different in appearance. The measurement is not wrong. It is answering a different question.

What colorimetry was built for

The 1931 system was an industrial specification, and reading it as such explains most of its design.

The problem was that manufacturers needed to communicate colours without shipping physical samples, and needed to know whether a batch matched a standard. Both are matching questions. Whether the standard looked pleasant, or looked the same in a shop as in a warehouse, was outside the remit.

So the system was built to have exactly one property: two stimuli with the same XYZ match when viewed under identical conditions by the standard observer. That is a strong, testable, useful claim and it holds.

Every word of the qualification is doing work. Under identical conditions — same surround, same adaptation, same size, same background. The standard observeran average over seventeen people, not any particular person. Match — appear the same when placed side by side, not appear the same in isolation.

The four things that change appearance without changing XYZ

Surround. The patch figure above. Identical stimulus, different neighbours, different lightness. The visual system reports something closer to a ratio than an absolute, and it does this for good reasons.

Adaptation state. A room lit by tungsten looks approximately white to somebody sitting in it and orange in a photograph. The stimulus is the same in both cases; what differs is what the observer’s visual system has normalised to.

Absolute luminance. Colours look more saturated and more contrasty as overall light level rises — the Hunt effect — and lighter colours gain contrast relative to dark ones as luminance increases, which is the Stevens effect. Neither is captured by XYZ, which is a relative quantity.

Size. A large patch and a small patch of identical stimulus do not look the same, which is why paint chips are notoriously misleading and why the CIE needed a ten-degree observer as well as a two-degree one.

None of these are failures of measurement. They are appearance phenomena, and the measurement never claimed to predict them.

The everyday version

The confusion shows up most often as three specific mistakes.

“These two greys have the same hex code, so they look the same.” Only if they have the same surround. Placed on different backgrounds they will not, and no amount of checking the code value will reveal it.

“The ΔE is under 1, so nobody can tell them apart.” ΔE thresholds are derived from side-by-side comparison under controlled conditions. Separated in space or time, or in different surrounds, much larger differences go unnoticed and much smaller ones become obvious.

“The colours are correct because the profile is correct.” Colour management ensures the stimulus is right. It has no control over the room, and a correctly managed image viewed under a tungsten lamp beside a window is being seen under conditions no profile knows about.

A single grey bar lying on a gradientThe horizontal bar is #959595 from end to end. Against the dark end of the ramp it looks light; against the light end it looks dark. This is the easiest figure here to verify — one bar, one value, and an eyedropper will confirm it anywhere along its length.the bar is one valuethe bar is #959595 throughoutasserted equal
Fig. 2 The same failure in the simplest possible form. One bar, one value, and an appearance that changes continuously along its length. Any specification of this bar by its colour value is complete and tells nobody what it looks like.

Where the boundary is drawn

Colour science handles this by having two layers, and being reasonably clear about which is which.

Colorimetry is the matching layer: XYZ, chromaticity, and the transformations of them. It is exact, it is standardised, and it is silent about appearance.

Colour appearance modelling is the layer above: CIECAM02, CIECAM16 and their relatives. These take a stimulus plus a specification of the viewing conditions — the adapting white, the background luminance, the surround type, the absolute luminance level — and predict appearance correlates such as lightness, chroma, colourfulness, hue and brightness.

The important structural point is that an appearance model needs inputs colorimetry does not. Feeding it a colour is not enough; it needs the situation. That is not a defect of the model, it is the content of the claim: appearance is a function of the whole viewing situation, so any model of it must take the situation as an argument.

This site’s foundation phase stops at the colorimetric layer, and says so. Every figure here states its assumptions about the display and then computes stimuli. Where an essay discusses appearance it is describing a phenomenon rather than computing a prediction, and the distinction is kept visible.

Where the two layers get confused in the standards

Two intermediate cases sit awkwardly between the layers and cause trouble in practice.

CIELAB is often described as perceptually uniform, which suggests it is an appearance space. It is not, quite. It incorporates a white point and a cube-root nonlinearity, so it carries some appearance-like structure, but it takes no account of surround, absolute luminance or background. It is best understood as a colorimetric space with a perceptual metric bolted on, and it is not very uniform anyway.

Colour difference formulae are fitted to perceptual judgements, so they are appearance-flavoured, and they inherit the viewing conditions of the experiments they were fitted to. A ΔE2000 value carries an implicit assumption of side-by-side comparison against a mid-grey background under a specified illuminant, and quoting it outside those conditions is quoting a number outside its domain.

Why this matters for design work

The practical upshot is that a colour cannot be specified in isolation and expected to behave.

A palette evaluated as a row of swatches is being evaluated in an arrangement it will never appear in. Swatches next to each other influence each other; the same swatches separated by white space do not. A palette that reads as well balanced in a strip can be badly unbalanced in use, and vice versa.

The same applies to accessibility checking. A contrast ratio is computed between a foreground and a background, which is correct as far as it goes — a ratio is exactly the kind of quantity the visual system cares about. But the ratio is computed from luminance, and the appearance also depends on what surrounds the pair, how large the text is, and the ambient light in the room. Meeting a ratio threshold is a necessary condition rather than a sufficient one.

This site’s own chrome is neutral for exactly this reason: any chroma in the page furniture would shift the appearance of every swatch, in a direction varying with position in the layout. That is enforced in the gate rather than left to discipline.

The failures in order of how much trouble they cause

Ranked by how often they cost somebody something.

Surround, in interface and print design. A grey specified by value will read lighter on a dark background than a light one. Any specification of the form “60% grey” fixes the stimulus and leaves the appearance open, which is why palettes have to be evaluated in the arrangement they will be used in rather than as a strip of swatches.

Adaptation, in photography and video. A camera records the stimulus; a person adapts. This is the entire reason white balance exists, and automatic white balance fails in exactly the situations the visual system’s own estimation fails in.

Size, in paint and materials. A colour chosen from a small chip looks different across a wall — generally more saturated and often lighter. The stimulus is identical and the appearance is not, which is why paint retailers sell large samples and why the CIE needed a ten-degree observer as well as a two-degree one.

Absolute level, in displays and print. Colours look more colourful and more contrasty as the light level rises. A design approved on a bright monitor will look flat in print under office lighting, and nothing in the colorimetry predicts it.

The Cornsweet edge, with its luminance profileThe two plateaux are both #898989 and are flat to exactly — the profile below shows that everything which differs lies within a narrow band at the boundary. Cover the centre line and the two halves become obviously identical.one value on the left, the same value on the rightluminance profileboth plateaux are #898989asserted equal
Fig. 3 The most extreme demonstration available. The two plateaux have identical colorimetry, identical surrounds, and identical everything within reach of them — the only difference in the figure is confined to a band neither touches. Colorimetry cannot distinguish these regions because there is nothing to distinguish.

What an appearance model needs that colorimetry does not

The structural point is worth stating precisely, because it explains why the two layers cannot be merged.

A colorimetric calculation takes a stimulus and returns coordinates. An appearance model takes a stimulus plus a specification of the viewing situation and returns appearance correlates. The extra arguments are the adapting white, the luminance of the background, the absolute luminance level, and a categorical description of the surround — average, dim or dark.

That is not a modelling inconvenience; it is the content of the claim. Appearance is a function of the situation, so a model of it must take the situation as input, and any system that returns an appearance from a colour alone has smuggled in an assumption about the situation.

A checkerboard under a shadow, with two squares markedThe two marked squares are both #797979. One is a dark square in full light; the other is a light square inside the shadow. Nothing about the drawing enforces the illusion — the two values are set equal in code and asserted before drawing.ABA and B are both #797979asserted equal
Fig. 4 The same point in its most familiar form. Two squares of identical colorimetry, in a scene the visual system parses as having two illumination levels. The parse is the situation, and no measurement of the two squares alone can recover it.

CIECAM02 and CIECAM16 are the standard models. They are considerably more complicated than CIELAB, they require inputs nobody usually has, and they predict things colorimetry cannot touch — which is a reasonable summary of the trade.

What was computed here

The figures on this page are colorimetric. Every value is computed and asserted, and the identity claims are checked in code — the two patches in the hero figure are compared before drawing and a mismatch stops the build.

What is not computed here is any appearance prediction. The essays describe effects and do not model them, because the foundation-phase machinery is a matching model and claiming otherwise would be exactly the error this essay is about. An appearance model is planned for the next phase, at which point the claims in this essay become computations rather than descriptions.

The neutrality of the page chrome is checked mechanically: every paper and ink token in the stylesheet is parsed and required to have equal red, green and blue channels. A token with any chroma in it fails the build.

The two-layer structure, stated once

It is worth writing down the division plainly, because most of the confusion in applied colour is a failure to notice which layer a question belongs to.

Colorimetry takes a stimulus and returns coordinates. It answers: will these two match, side by side, under identical conditions, for the standard observer? Exact, standardised, silent about appearance.

Appearance modelling takes a stimulus and a viewing situation and returns lightness, chroma, hue, colourfulness and brightness. It answers: what will this look like, here?

A question of the form “what colour is this” is a colorimetric question. A question of the form “will this look right” is an appearance question, and answering it from colorimetry alone requires assuming a viewing situation, usually without noticing that the assumption was made.

White's illusion: identical bars on a square-wave gratingBoth grey bars are #909090. The bar sitting in a dark stripe looks darker, not lighter — the opposite of what contrast with the immediate surround predicts, which is why this figure is the standard objection to explaining brightness by lateral inhibition alone.in a dark stripein a light stripeboth bars are #909090asserted equal
Fig. 5 The gap in one figure. These two bars have identical colorimetry, identical local surrounds by any simple measure, and different appearance — because the visual system has grouped each with the stripe it lies along, which is a fact about scene organisation and not about the stimulus.

What this site does about it

The foundation phase stops at the colorimetric layer and says so on every page. Figures compute stimuli, name their observer, name their assumed display, and mark what cannot be shown.

Where an essay discusses appearance — this one, and the three in the what the brain does field — it describes phenomena and asserts identities rather than predicting appearances. That is a deliberate boundary. Computing an appearance prediction would require an appearance model, and presenting one without the model would be exactly the overreach this essay is about.

One more layer down

It is worth noting that even the matching layer is not simple. Discrimination varies enormously across the space, so “will these match” has a threshold that depends on where in the space the question is asked.

MacAdam's discrimination ellipses, drawn 10 times actual sizeTwenty-five ellipses of colours indistinguishable from their centres. They are drawn at 10× because at true scale most are thinner than a line. Their areas vary by a factor of 74, which is the whole result: a step of the same size in xy means very different things in different places.0.00.20.40.60.80.00.20.40.60.8xyellipses at 10× scaleCIE 1931 2° observer
Fig. 6 Even within the matching layer the geometry is awkward. These contours describe discrimination under controlled conditions — a narrower question again than appearance, and still not uniform.

The practical test for which layer a question belongs to is short: does the answer change if the surroundings change? If yes, it is an appearance question and colorimetry alone cannot settle it. If no, colorimetry is sufficient and is exact. Most of the questions people actually want answered — will this look right, do these go together, is this readable — turn out to be in the first category, which explains why colorimetry so often disappoints the people using it.

What the pictures cannot show

The central limitation is unavoidable. Demonstrating that appearance depends on viewing conditions requires controlling the viewing conditions, and this page has control over exactly none of them. The reader’s screen brightness, ambient light, and distance are all unknown and all affect how strong every effect here appears.

There is also a self-referential problem. The figures are trying to show that identical stimuli look different, and they are doing so by presenting stimuli whose identity is guaranteed only in the file. What arrives at the reader’s eye has passed through a display with its own transfer function and its own uniformity errors, and a screen with a brightness gradient across it will make two identical patches genuinely different at the eye.

Nothing on this site can rule that out, and it is one of the reasons the display is treated as an unknown rather than as a specification.

Who found it, and when

The distinction is old. Hering argued in the nineteenth century that colour appearance depends on context in ways that a receptor-level account could not capture, against Helmholtz’s more reductive position, and both turned out to be describing real stages.

The CIE was explicit from the start that its system was a matching specification. The drift toward reading it as an appearance model happened later and largely outside colour science, as colorimetric values entered computing and design through file formats and colour pickers, where the qualifications did not travel with them.

CIECAM97s appeared in 1997 as the first widely adopted appearance model, revised as CIECAM02 and again as CIECAM16. Robert Hunt and Mark Fairchild are the names most associated with establishing appearance modelling as a distinct layer, and Fairchild’s Color Appearance Models remains the standard treatment.

Where this goes next

The mechanism behind the surround effects is these two patches are identical and brightness is inferred from edges. The adaptation half is constancy is the default. And for the metric that sits awkwardly between the two layers, how far apart are two colours.