A third space breaks the tie only once
Assumes Two uniform spaces disagree about between, The straight line is not the shortest gradient and A model judged in another model's unit.
Two uniform spaces disagree about between found the shortest path between two colours under ΔE₀₀’s local metric and under CAM16-UCS’s, and found the two paths running through different colours. On some gradients they are further from each other than either is from the straight line in CIELAB. It ended by naming the test that would say whether the disagreement belongs to the problem or to the two fits: ask a third space.
Oklab is the natural third. It is widely used for exactly this job — a gradient is a path is the collection’s account of why drawing programs adopted it — and it is Euclidean by construction, so its shortest path between two colours is the straight line in its own coordinates. Carried back into CIELAB, that line is a curve that can be set beside the other two.
The earlier essay named three outcomes. If Oklab’s path sat near one of the two, the other would be the one to distrust. If it sat between them, the three would be a spread around a common answer. If it sat outside both, the path would not be constrained by anything the spaces were fitted to. All three happen, on different gradients.
One tie broken, three not
Of the five gradients that are not the neutral axis, Oklab sides clearly with one of the other spaces on one. On red to blue its path runs 5.6 CIELAB units from CAM16-UCS’s and 29.0 from ΔE₀₀’s, and both it and CAM16-UCS bow about 42.5 units from CIELAB’s straight line where ΔE₀₀ bows 14.4.
- On red to green and cyan to magenta, Oklab keeps to CIELAB’s own straight line, within 1.7 and 1.0 units, while ΔE₀₀ bows 19.0 and 9.9 and CAM16-UCS 14.3 and 12.2.
- On blue to yellow it bows further than either: 44.0, against 35.4 for ΔE₀₀ and 28.0 for CAM16-UCS.
- Each space is the odd one out on some gradient: Oklab on red to green and blue to yellow, CAM16-UCS on cyan to magenta, ΔE₀₀ on red to blue.
- Oklab’s large bows come only on the two gradients that end at a pure blue, which is where CIELAB’s hue lines are known to bend.
- The comparison found a CAM16-UCS geodesic that had not converged. On red to blue, Oklab’s straight line measured 84.7 under CAM16-UCS against 86.5 for the path the earlier relaxation returned. Relaxed from Oklab’s line, CAM16-UCS’s path is 82.8, bows 42.5 instead of 16.9, and runs 26 units from where it was.
A metric that needs no relaxation
ΔE₀₀ and CAM16-UCS have local metrics that change from colour to colour, so their shortest paths have to be found numerically: start from a path, measure its length under the metric, and move its points downhill until the length stops falling. The straight line is not the shortest gradient built that relaxation, and the earlier comparison ran it for both.
Oklab needs none of it. Distance in Oklab is Euclidean distance in its own coordinates, so its shortest path is the straight line there, exactly. Converting twenty-one equally spaced points on that line back through XYZ into CIELAB gives Oklab’s geodesic as a curve among the other two.
Comparing three curves needs a fair measure of how far apart they are, and the earlier one was not quite fair. It measured from each point of one curve to the nearest point of the other. Two curves lying along the same line but sampled at different spacings then read as apart by up to half a step, and on the neutral axis CIELAB’s and Oklab’s straight lines are the same colours sampled differently. The distance is now measured from each point to the nearest place on the other curve’s polyline, which reads that case as zero. Every gap below, and the corrected numbers in the earlier essay, use it.
Lengths are measured on every path resampled to 120 segments, so that three different spacings of points do not become three different numerical errors.
The tie Oklab breaks
The figure above is red to blue, and it is the one gradient where the third space settles something.
ΔE₀₀’s path bows 14.4 units from CIELAB’s straight line. CAM16-UCS’s and Oklab’s both bow about 42.5, on the same side, and run within 5.6 units of each other the whole way. Two spaces agree that the straight line in CIELAB from red to blue passes through the wrong colours by about forty units, and the colour-difference formula built in CIELAB coordinates says by fourteen.
The difference is visible in what the paths pass through. At the midpoint CIELAB’s straight line is a purple of chroma 82 at a hue angle of 346 degrees; ΔE₀₀’s path is at chroma 66 and 351; CAM16-UCS’s at 44 and 335; Oklab’s at 50 and 318. Three quarters of the way to blue the straight line is at chroma 102 and 321 degrees, and Oklab’s and CAM16-UCS’s are at 83 and 62 chroma and 302 and 309 degrees. Both leave the saturated purples of CIELAB’s line for less saturated colours, and both hold hue angles nearer blue’s for longer.
The second part fits what white turns a hue, and the models part at blue met from another direction. CIELAB’s lines of constant hue bend in the blues, so a colour that looks the same blue sits at a lower CIELAB hue angle as it desaturates. Oklab took its hue from IPT, which was fitted to keep perceived hue straight there, and ΔE₀₀ inherits CIELAB’s coordinates and corrects the blue region only by rotating its tolerance ellipses. That is a likely contributor rather than a measured cause.
And the agreement is weaker evidence than two independent votes. Oklab was fitted in part to reproduce CAM16’s lightness and chroma predictions, so on a gradient where the paths differ mostly in chroma, two of the three spaces are not independent witnesses. What is measured is that they agree here, and that ΔE₀₀ is the odd one out.
Where Oklab keeps the straight line
On red to green, Oklab’s path is within 1.7 units of CIELAB’s straight line; on cyan to magenta, within 1.0; on the warm grey to the cool one, 1.5. On the first two, both other spaces bow by ten to nineteen. On those gradients Oklab and CIELAB agree about what lies between the ends, and the two spaces that bow away from them disagree with each other as well.
On red to green ΔE₀₀’s and CAM16-UCS’s paths run 5.7 units apart, close by the standards of this comparison, and Oklab’s runs 17.8 and 12.9 from them. If the two bowing spaces were taken as a consensus, Oklab would be the outlier. But Oklab’s path is CIELAB’s straight line almost exactly. The third space’s answer is the naive answer, and the two spaces that improve on it agree with each other about how to.
So Oklab does not always break ties. Sometimes it sides with CIELAB, the space both others were built to improve.
Where it bows furthest
On blue to yellow Oklab bows 44.0 units, ΔE₀₀ 35.4 and CAM16-UCS 28.0. All three agree that CIELAB’s straight line is badly wrong, and they disagree about what to put in its place. At the midpoint CIELAB’s line passes through a pink at chroma 30. ΔE₀₀’s and CAM16-UCS’s paths pass almost through grey, at chroma 3 and 2. Oklab’s passes through a blue-green at chroma 24, on the far side of the neutral axis from CIELAB’s pink. Its path runs 19.3 units from ΔE₀₀’s and 21.9 from CAM16-UCS’s, which are 8.0 from each other.
So on the gradient where every space agrees a correction is needed, two of them route the middle through grey and the third routes it round the other side. Blue is again at one end, and again Oklab’s hue parts from CIELAB’s most.
Cyan to magenta, and the distances between all three
On cyan to magenta ΔE₀₀’s and CAM16-UCS’s paths are 15.7 units apart, and Oklab’s runs 10.8 from one and 11.8 from the other. That is the “between” outcome in the strict sense: Oklab is closer to each than they are to each other. It is between them because it is on CIELAB’s straight line, 1.0 units away, and the two others leave that line on the same side at different places along the gradient — ΔE₀₀’s pulling in most in hue, CAM16-UCS’s most in chroma — so the line runs closer to each than they run to each other.
Taking all five gradients together, the pair of spaces closest to each other changes: ΔE₀₀ and CAM16-UCS on red to green and blue to yellow, Oklab and CAM16-UCS on red to blue, and on cyan to magenta Oklab sits between. The space furthest from the other two is Oklab twice, CAM16-UCS once and ΔE₀₀ once. No one of them is the outlier to set aside, and the three do not scatter around one answer.
What each space charges for the others’ paths
Where the paths lie is one question; how much it matters to each space is another. A path that runs twenty units from a space’s own geodesic might still be nearly as short under that space’s metric, if the metric is flat in that direction.
The largest charge any space makes for another’s path is 11.6 per cent: ΔE₀₀ on Oklab’s path from blue to yellow. About half the charges are under five per cent, and on red to green every charge for another space’s path is under five. By their own lengths the spaces are nearly indifferent between paths that run fifteen units apart, which is the flatness a gamut charges a gradient nothing found and used.
Red to blue shows it most clearly. ΔE₀₀ charges CIELAB’s straight line 1.0 per cent over its own path, and Oklab’s path 10.2. Oklab charges the straight line 14.9 per cent. Each space’s cheapest route is expensive in the other’s metric, and the straight line is cheap in one and the dearest of all in the other. A drawing program that switched its gradient space from CIELAB to Oklab would, by ΔE₀₀’s reckoning, have made red to blue nine per cent longer; by Oklab’s, it would have made it thirteen per cent shorter.
The geodesic that had not converged
The earlier comparison ran each relaxation twice, from the straight line and from the other space’s answer, and kept the shorter. That was meant as a convergence check: a descent that ends longer than a path it has been shown has not finished.
On red to blue both starts had settled in the same local minimum. Oklab’s straight line, measured under CAM16-UCS’s metric, came to 84.7 — shorter than the 86.5 of the path the two starts had returned as CAM16-UCS’s shortest. A path cannot be shorter than the shortest path, so the returned one was not the shortest.
Relaxed from Oklab’s line, CAM16-UCS’s path comes to 82.8, 4.3 per cent shorter. It bows 42.5 units from CIELAB’s line instead of 16.9 and runs 25.8 units from the path it replaces. The earlier essay’s red-to-blue numbers have been corrected: the gap between ΔE₀₀’s and CAM16-UCS’s paths there is 28.3 units, not 6.8, the largest of the six rather than a small one.
The relaxation now starts from Oklab’s line as well, for both metrics and every gradient. On the other five gradients the third start changed no path by more than a fiftieth of a unit of length. What it shows is how the two agreeing starts were misled. Two starting points on the same side of a ridge find the same valley, and the straight line and a path that bows modestly from it were on the same side. A start from a different space’s geometry was on the other.
A threshold is not a unit made the general point about formulae fitted in one regime and used in another. The same caution applies to numerical minima: a result checked only against starts that share its assumptions has been checked against itself.
How the paths and lengths were measured
The six gradients are the earlier ones: red to green, blue to yellow, cyan to magenta, black to white, red to blue and a warm grey to a cool one, with endpoints at the sRGB primaries, secondaries and two mid greys. ΔE₀₀’s and CAM16-UCS’s geodesics are relaxations of twenty-segment paths under each metric’s local quadratic form, taken by finite differences in CIELAB coordinates, and CAM16-UCS’s is the Euclidean distance in J′a′b′, because a distance raised to a power has no length and its published difference is one. Each is now started from CIELAB’s straight line, from the other metric’s answer and from Oklab’s straight line, and the shortest is kept.
Oklab’s geodesic is twenty-one equal steps along the straight line between the two endpoints in Oklab, converted to XYZ and then to CIELAB with a D65 white.
The distance between two curves is the larger of the two one-sided distances, each the furthest any point of one curve sits from the polyline through the other. A path’s bow is the furthest any point sits from CIELAB’s straight segment. Lengths are taken on each path resampled to 120 equal CIELAB segments: under ΔE₀₀ and CAM16-UCS as the sum of each segment measured by the local form at its midpoint, under Oklab as the sum of Euclidean segment lengths in Oklab. The odd one out is the space whose path has the largest summed distance to the other two.
What this leaves out
Five gradients are examples, not a census. Endpoints at primaries and secondaries are the most saturated colours sRGB holds, where every space’s fit is thinnest. The pattern that Oklab’s large bows come at the blue ends is two cases, and a census of random pairs would say whether it is a rule.
The comparison is in CIELAB coordinates, which belong to none of the three spaces’ metrics but are the frame two of them are computed in. Which space is the odd one out depends on distances measured in that frame, and in Oklab’s own coordinates the gaps would be different numbers. Whether the ranking of outliers survives a change of frame is untested.
Oklab’s geodesic is exact and the other two are numerical. The third start found one local minimum the first two had missed, and there are more: relaxing CAM16-UCS’s path on red to blue from ΔE₀₀’s final path, rather than from its first, lands at 84.4, between the two already found. Nothing guarantees 82.8 is the lowest. A relaxation from many random starts would be the stronger check, at many times the cost.
And none of this is an observer’s judgement. Three spaces agreeing on one gradient is a fact about three fits, and Oklab was fitted in part to CAM16’s own predictions. A model judged in another model’s unit is the standing caution against treating agreement between models as confirmation.
Still open: which red-to-blue gradient looks even
Red to blue is the gradient where the three spaces give the sharpest testable prediction, and it is cheap to test.
Two of the three spaces say the evenly spaced red-to-blue gradient bows about forty CIELAB units away from CIELAB’s straight line; the third says fourteen. Rendered on a display, the two candidate paths differ visibly in the middle of the gradient, where one passes through a more saturated violet than the other. The experiment is a forced choice between the two, and the complementary question on red to green, where Oklab says the straight line and the others say a path bowing fifteen to nineteen units towards the neutral axis.
The prediction worth recording is that the forced choice will agree with Oklab and CAM16-UCS on red to blue, because hue drift towards purple is a large, well-documented effect, and will be close to chance on red to green, where all three spaces’ charges for each other’s paths are a few per cent. If it is, the useful statement is not that one space is right but that the spaces agree where a large effect was fitted and diverge where nothing was.
A convergence check must start somewhere different
The habit is about checking a numerical answer.
A relaxation finds a minimum, and the natural check is to run it again from somewhere else and see whether it lands in the same place. That check is only as good as its starting points are different. Two starts that share an assumption — here, that the answer is near CIELAB’s straight line — agree with each other and prove nothing about the answer.
The move is to start from somewhere another model would put the answer. A second space’s geodesic is such a start. It costs one more relaxation, and it is the only kind of start that can land in a valley the first model’s geometry hides.
The failure mode is to call two agreeing runs converged. The red-to-blue path passed that check for as long as the check existed, and it was twenty-six units from the lower minimum a third start found.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the index of named objects makes visible.
- The mixture line bows cielab · colour difference · gradient · interpolation
- Which mixture bows most depends on the ruler ciede2000 · colour difference · gradient · perceptual uniformity
- A colour has a name ciede2000 · cielab · perceptual uniformity
- A departure is straight in the excitations ciede2000 · colour difference · perceptual uniformity
- A deviation is not a difference ciede2000 · cielab · colour difference
- A dial through a discrete menu ciede2000 · colour difference · interpolation
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.
CIEDE2000CIELABColour appearanceColour differenceConventionGradientHueInterpolationOklabPerceptual uniformity