What the brain does

An appearance is not always a stimulus

CIECAM16's inverse is a closed form that returns three numbers for every lightness, chroma and hue it is handed. Whether those three numbers are a light it does not ask, and over a lattice spanning the space a specification is written in, 10.8 per cent of them are not — one tristimulus value negative, or a relative luminance above the white's. Only 43.8 per cent are colours a display could show at all.

Assumes The appearance model takes XYZ, A viewing condition is an argument and What one number accepts.

An appearance model runs in two directions. Forwards it takes a stimulus and a situation and returns what a settled observer would report; backwards it takes a report and a situation and returns the stimulus that would produce it. This collection’s own machinery asserts that the round trip is exact to the floating-point floor, and it is.

Where a stated appearance has no stimulus under it. The chroma the inverse can still return a light for, at lightness 50, all the way round the hue circle. Below the curve a stated appearance corresponds to a stimulus; above it the formula still returns three numbers and one of them is negative. Over a lattice of 10488 appearances spanning the whole space a specification is written in, 10.8 per cent are of that kind, and only 44 per cent are colours a display could show.
Fig. 1 The chroma the inverse can still return a light for, at one lightness, all the way round the hue circle. Above the line the formula still answers and one of its three numbers is negative.

The claim

The inverse always answers, and the answer is a stimulus only inside a region the coordinates do not describe.

  • Over a lattice of 10,488 appearances spanning the whole space, 10.8 per cent invert to something that is not a light — 1,119 with a negative tristimulus value and 17 with a relative luminance above the white’s.
  • Only 43.8 per cent invert to a colour a display could show.
  • The boundary is not a coordinate surface. At one lightness the largest chroma with a stimulus under it runs from 72 at one hue to unbounded at another.
  • And nothing in the model reports it. The inverse’s return value is three numbers whether or not those numbers are a light.

What the round trip proves and does not

The exactness of the round trip is worth being careful about, because it is easy to read as more than it is.

The assertion this collection carries is that taking a stimulus forwards to a set of correlates and back again returns the stimulus, to within a tenth of a picounit. That is a strong statement and it is true. What it establishes is that the two directions are inverse functions on the image of the forward map — on the set of correlate triples that some stimulus actually produces.

It says nothing about the rest of the coordinate space, and the rest of the coordinate space is not small. Lightness, chroma and hue are three numbers with obvious ranges — nought to a hundred, nought to something, a full circle — and a specification, an interface or a piece of software will happily accept any point in that box, in the way a code value accepts any lattice point. The forward map’s image is a curved region inside it whose boundary has no equation.

One stimulus, three rooms, three appearances. The same XYZ in a dark, a dim and an average surround. The stimulus does not change and is drawn identically in all three panels; what changes is what CIECAM16 says it looks like. Predicted lightness runs from 52.0 to 42.3 — a spread of 9.7 — with chroma and colourfulness moving too. Colorimetry returns one answer here because it has nowhere to put the room.
Fig. 2 An appearance model takes a stimulus and a situation. Both directions take the situation; only one of them takes something that has to exist.

So the model is invertible and its coordinate system is not a description of anything. That is the ordinary situation for a curved region in a box, and it is worth stating because the coordinates are the part a person handles.

How much of the box is empty

The measurement walks a lattice: lightness every five units from five to ninety-five, chroma every five from nought to a hundred and ten, hue every fifteen degrees. Ten thousand four hundred and eighty-eight points, which is the shape of the space a specification is written in rather than a sample of any physical set.

At each point the inverse is called and its answer is examined. A negative tristimulus value is not a light: no spectral power distribution, however constructed, integrates to a negative X. A relative luminance above the white’s is not a surface, though it can be an emitter, so it is counted separately and it is rare — seventeen points of ten thousand.

One thousand one hundred and thirty-six points of ten thousand four hundred and eighty-eight — 10.8 per cent — have nothing under them. That is a larger share than the fraction of the chromaticity diagram a display can reach is small. Another 45.4 per cent are lights that exist and that no display can show, which is the ordinary situation for most of the chromaticity diagram and is a different problem. The remainder, 43.8 per cent, are colours a display could produce.

Where a stated appearance has no stimulus under it. The chroma the inverse can still return a light for, at lightness 70, all the way round the hue circle. Below the curve a stated appearance corresponds to a stimulus; above it the formula still returns three numbers and one of them is negative. Over a lattice of 10488 appearances spanning the whole space a specification is written in, 10.8 per cent are of that kind, and only 44 per cent are colours a display could show.
Fig. 3 The same boundary at a higher lightness. The shape moves and it does not become a circle, an ellipse or anything else with a name.

The boundary’s shape is the part with no compact description. At lightness fifty the largest chroma with a stimulus under it runs from about 72 at the worst hue to beyond the search’s own ceiling at the best — so in some directions the constraint binds at ordinary chroma and in others it does not bind at all within the range anybody would write down.

Why negative, and what it means

The mechanism is worth stating because it explains why the region is shaped as it is.

CIECAM16 works in a cone-like space: the stimulus is taken through a three-by-three into three signals, each is compressed by a power law, and the correlates are built from the compressed signals. Inverting means undoing the compressions and then undoing the matrix, and the matrix’s inverse has negative entries, as every such matrix does.

So a set of correlates that implies a large signal in one compressed channel and a small one in another can, after the inverse matrix, imply a negative tristimulus value. That is the same fact that makes imaginary primaries imaginary: a linear combination of real quantities with negative coefficients is not itself a real quantity, and colour science has been living with it since the standard observer was averaged over seventeen people.

What is new here is where it lands. The 1931 primaries’ unreality is a property of a basis nobody uses for stimuli. This is a property of the coordinates a specification is written in, and there is no equivalent of stay inside the horseshoe to guide somebody writing one.

The corner the hue scale has at each unique hue. How fast hue quadrature runs against hue angle, all the way round. It is piecewise, with a corner at each of the four unique hues, and its slope runs from 0.47 near 238 degrees to 1.92 near 90 — a factor of 4.1. The largest corner is at blue, where the slope changes by a factor of 0.41 across a single point.
Fig. 4 The model’s own hue scale, which is a piecewise interpolation with a corner at each unique hue. The boundary above is drawn against hue angle rather than against quadrature, and the two are not the same axis.

The shape of the region, described as well as it can be

A region with no equation can still be described, and three things about this one are worth carrying.

It is not convex in the coordinates. Walking outward in chroma at a fixed lightness and hue leaves the region once and does not come back, which makes the boundary a well-defined ceiling in that direction — but walking in lightness at fixed chroma and hue can leave and re-enter, because the model’s compression treats the two ends of the lightness scale differently.

Its ceiling in chroma varies by more than a factor of three around the hue circle at a fixed lightness, and the hues where it binds soonest are the ones the model’s own hue scale runs slowest through. That is not a coincidence: both are consequences of the same three-by-three, whose rows are far from equal.

And it grows with lightness up to a point and then shrinks. At J 50 the tightest hue admits a chroma of about 72; at J 70 the same hue admits more; near J 95 the region closes in on the neutral axis, because a colour that light has very little room to be chromatic without one of its channels going negative.

None of those three is available from the coordinates themselves. Each is a measurement of the forward map’s image, and the only way to have it is to compute it.

The two ways out that do not work

Two obvious repairs suggest themselves and neither survives being tried.

Clamping. If the inverse returns a negative value, set it to zero. That produces a stimulus, it is what most implementations effectively do, and the stimulus it produces has a different appearance from the one that was asked for — sometimes very different, since clamping a negative channel changes the colour rather than moving it slightly. So the specification has been silently replaced by another one and nothing records which.

Projecting. If the appearance is outside the image, find the nearest appearance inside it and use that. This is defensible and it is what a good gamut mapping does. What it needs is the boundary, which is exactly the object nobody has: the projection cannot be computed without first computing the region, and computing the region is the loop this essay is about.

So the useful repair is not at the inverse at all. It is upstream: a specification written in appearance coordinates should be checked against the image before it is agreed, and the check is one call to the inverse and one sign test.

That is cheap enough to be a validation rule in a colour-management tool, and no tool consulted here performs it. What tools do check is whether an appearance is inside a device’s gamut, which is the second boundary and is the one everybody thinks of.

What this does to a specification

Three consequences, and they are practical rather than philosophical.

An appearance specification can be unsatisfiable and look ordinary. A brand specifying a colour as a lightness, a chroma and a hue in a stated viewing condition has written three numbers that a colourist will accept, and one in nine such triples drawn at random from the sensible ranges corresponds to no light at all. The proportion for triples anybody would actually write is much lower, because people write plausible chromas — but nothing warns.

A gamut mapping in appearance coordinates has two boundaries to respect. The destination device’s gamut is the one everybody knows about. The model’s own domain is the other, and an algorithm that walks outward in chroma looking for the device boundary can leave the model’s domain first, at which point its objective function is evaluating on stimuli that do not exist.

What a stated lightness pins down, and where. A lightness quoted to 0.05 of a unit, inverted, and the luminance it fixes. Read as a fraction of the colour's own luminance the requirement is 0.90 per cent at J 10 and 0.097 at J 95, a factor of 9.3. Read in absolute luminance it is the other way round, by a factor of 6.5. Both readings are true and they answer different questions.
Fig. 5 What a stated lightness pins down, at each end of the scale. A specification’s precision is not uniform either, which is the next rung’s subject and is the same kind of problem.

And a round trip through the model is not always a round trip. Forward from a stimulus and back is exact. Backward from a specification and forward again is exact only if the specification was in the image, and if it was not, the intermediate value is not a colour and whatever the forward map does with it is undefined.

Where averaging the model's answers is and is not averaging its argument. Each row takes a spread of situations, averages the model's predictions across them, and compares that against the model's prediction for the average situation. The bar is the gap as a share of the spread itself. Over the differences between observers it is 1.4 per cent — the model is very nearly linear there. Over the range of adapting luminance one room covers in a day it is 59 per cent, and from indoors to outdoors 74.
Fig. 6 The gap between the mean of the model’s answers and its answer for the mean, over two different arguments. Both are properties of the same compression the inverse has to undo.

The compression the inverse undoes is the same one that produces every other result in this ladder. Its exponent decides how much of the coordinate box is empty, how unevenly a stated precision pins a stimulus, and how far the mean of several predictions sits from the prediction for the mean. Four different measurements, one exponent.

Every adaptation number here assumes a complete adaptation. Three curves and their mean: the colour difference an adapted observer is left with after a change of light, against the degree of adaptation from zero — no adaptation at all — to one. Every adaptation figure in this collection is computed at one, the right-hand end. The appearance model's own formula puts the degree at 0.941 for an average surround at a hundred candelas, marked, where the residual is 2.21 ΔE00 rather than 1.27 — larger by a factor of 1.74. The left-hand end is exactly the unadapted change, which is not an approximation but an identity, and is what says the curve interpolates between the two things it claims to.
Fig. 7 The degree of adaptation, which this collection measured in an earlier round and found to be 0.94 rather than one in an ordinary room. That number is an argument to the same inverse, and moving it moves the boundary.

And the boundary depends on arguments the round before this one found were not being varied. The degree of adaptation, the background level, the surround: each is a term in the matrix the inverse has to undo, so each moves the region. A specification checked against the image under one set of assumptions has not been checked under another.

What was computed, and how

The lattice is stated above and is deliberately regular rather than sampled: the question is about the coordinate box a person writes in, so the box is walked rather than a physical set.

The viewing condition is the collection’s reference — average surround, an adapting luminance of a hundred candelas a square metre, a background at twenty per cent — and the whole boundary moves with it, since the model’s domain is a function of the situation as much as its range is.

Which of the model's correlates the room actually moves. One stimulus, unchanged, read at adapting luminances from 8 to 20000 candelas a square metre, each quantity against its own largest value. Brightness rises by a factor of 5.1 and colourfulness by 2.0. Lightness moves by 2.5 per cent and chroma by 3.3, because both are ratios to the white and the white moved too.
Fig. 8 Which correlates the room moves. The domain moves with the room too, so a specification that is satisfiable in one viewing condition need not be in another.

The test for is this a light is that all three tristimulus values are non-negative. That is necessary and not sufficient: a non-negative tristimulus value is a light only if it lies inside the spectral cone, which for a three-dimensional space with the standard observer’s curves is nearly the same condition and is not exactly it. So the 10.8 per cent is a lower bound on how much of the box is empty.

The stronger test — whether a surface under this illuminant could produce it — is the object-colour solid, and this collection has machinery for it. Applying that would raise the figure considerably and would answer a different question, since a specification may describe an emitter.

The check, written out

Since the repair is a validation rule rather than a change to the model, it is worth setting out what the rule is, because it is three lines.

Given a lightness, a chroma, a hue and a viewing condition: call the inverse, and test whether all three returned values are non-negative and whether the second is at or below the white’s. If both hold, the specification names a light. If not, it names nothing.

The rule’s cost is one call to a formula that runs in microseconds, and its output is a boolean. It is the cheapest check in colour management and it is not performed anywhere.

Two refinements are worth having if the specification is about a surface rather than an emitter. The first is the object-colour bound, which this collection can compute and which rules out a good deal more. The second is the device gamut, which is what everybody checks instead.

The order matters, and it is the reverse of the usual one. A specification outside the model’s own domain is not a hard case for a gamut mapping; it is a specification with nothing to map. Checking the device first and the model never is checking the second question and not the first.

What a curved region in a box usually costs

The structure of this finding is common enough to be worth naming, because a reader will meet it elsewhere in colour and outside it.

A set of physically realisable things is nearly always a curved region. The coordinates people use to talk about it are nearly always chosen for interpretability — lightness, chroma and hue are chosen because a person can hold them in mind, not because their box is the region. So the box is larger than the region, and the difference is where the trouble is.

Colour science has one famous instance and has domesticated it. The chromaticity diagram’s horseshoe is exactly this, and every practitioner knows that a point outside it is not a colour — because the boundary is drawn, in every textbook, as the first picture anybody sees. The boundary is not hard to describe and it is not hard to remember, and both of those are because somebody drew it.

The appearance model’s domain has never been drawn. It is three-dimensional, its boundary has no equation, and it moves with the viewing condition — three good reasons not to draw it and none of them a reason it should not be computed.

The difference between a constraint everybody respects and one nobody has heard of is a picture, and that is the argument for the figure at the head of this essay rather than for anything in the arithmetic.

Where the model stops

The lattice’s ranges are choices. Chroma to a hundred and ten is generous and lightness from five to ninety-five avoids the two ends where the model’s own behaviour is least trustworthy. A different box gives a different percentage and the same structure.

Nothing here says the model is wrong. A model whose inverse had no such region would be a model whose coordinates were a parameterisation of the physical set, and no appearance model is that — the coordinates are chosen to be interpretable, and interpretable coordinates and physical ones are different requirements.

And the measurement is of one model in one condition. CIELAB has the same property and a much simpler version of it: negative reflectances are reachable there too, and nobody is surprised because L*, a* and b* have never been mistaken for a description of what exists — though its own straight piece exists to keep the arithmetic sane at one end of it.

The generalisation

The habit is about a function that always returns.

An inverse computed in closed form has no failure mode: it is a sequence of arithmetic operations and it produces a number for every input. Whether that number means anything is a separate question, and the code cannot ask it, because the check is about the domain of the forward map rather than about the arithmetic.

The move is to compute the image of the forward map once, at whatever resolution is affordable, and to say what fraction of the coordinate box it covers. It is a loop, and the answer is one number that a specification’s author can be told.

The failure mode is that the empty region is discovered downstream, by whatever consumes the inverse’s output — a renderer that clamps, a solver that diverges, a printer that produces something else. An unsatisfiable specification that produces a plausible number is worse than one that fails, because the failure travels to somebody who cannot see where it came from.

Who found it, and when

That appearance-model coordinates describe a curved region rather than a box is understood by the people who implement them, and the CIE’s own technical reports on CIECAM02 and CIECAM16 discuss the model’s domain and its numerical behaviour at extremes. The failure of the CIECAM02 inverse in certain regions is documented and is one of the reasons CIECAM16 exists.

What does not appear in that literature is the fraction. The discussion is about pathological cases; the measurement here is about how much of the ordinary coordinate space is outside the image, and the answer is that it is not a corner.

Where the ladder goes next

The boundary above is drawn against hue angle, and the model has a second hue scale — the quadrature, which is what its own hue correlate is reported in. That scale is an interpolation through four numbers with a corner at each of them, and it runs four times faster in one part of the circle than in another.

What this makes readable

Essays that name this one as a prerequisite.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the index of named objects makes visible.

What links here

Every essay whose body links to this one.

The objects this essay names

Each one links to every other essay that touches it.

Appearance modelCIECAM16Colour appearanceDeclared inputGamutImaginary primariesInvarianceSpecificationStructural choiceTristimulus