KNOWLEDGE MAP · SDR & HDR

Converting a colour does not make it fit.

Convert linear Rec.2020 to Rec.709 or P3. Compare signed RGB, clipping and a teaching compressor that preserves Y.

Read the numbers. Notice the assumptions. Then apply the idea to your footage.

SIGNAL LAB / COMPUTED MODEL

A boundary is not a solution.

CIE xy · NO SPECTRAL LOCUS000.20.20.40.40.60.60.80.8xyRec.2020 → Rec.709 / sRGB
SourceHard clipCompression
SourcesRGB preview clipped
Hard clipsRGB preview fits
CompressionsRGB preview fits
Target RGB · before mapping-0.378 / 0.79197 / -0.04679
Target RGB · after clip0 / 0.79197 / 0
Target RGB · compressed0.00194 / 0.65542 / 0.18693
ΔY clip = 0.083755ΔY map = 0

The raw target RGB is outside 0…1. Mapping threshold 0.75 · q = 1.783 → 0.996

Rec.2020 linear input → target RGB. The teaching compressor moves towards a neutral of the same linear Y; it does not guarantee perceptual hue and is not ACES/RCM. All swatches use clipped sRGB preview, including P3. xy alone does not describe a 3D colour volume.

COLOR SCIENCE / 05 / SDR & HDR

An experiment, not a preset.

On this page ↓
TOPIC ILLUSTRATION

THE ESSENTIAL IDEA

Gamut mapping: from coordinate conversion to reproducible colour

A matrix changes colour coordinates. Gamut mapping decides what to do when the colour does not fit the destination. It changes relationships, requiring priorities for hue, lightness, saturation and detail.

  • Do not assume negative RGB means a calculation error.
  • Compare Y preservation with chromaticity changes.
  • Distinguish working-signal conditioning from final output gamut fitting.
Topic illustration, not a display measurement or a function plot. The lab above provides the numerical experiment.
01

Out of gamut describes a colour relative to a target

A colour can fit a larger space but require negative or above-one components in a smaller space. After correct linear conversion, such values are not necessarily errors: the exact colour lies outside the chosen bounded RGB cube.

Identify the processing stage before limiting it. Extended values may be useful in scene-referred work; final output has defined constraints. Requiring 0…1 at every node can destroy data prematurely.

What this means in practice

Choose saturated Rec.2020 green and a Rec.709 target. Negative matrix outputs are deliberately retained and displayed.

02

A matrix preserves colourimetry, not the fitting decision

With matched white points, a linear XYZ conversion changes RGB coordinates for the same stimulus. It does not choose a replacement for an unreproducible colour. Different whites add an adaptation decision, which is not itself complete gamut mapping.

The lab’s Rec.2020, Rec.709 and P3 share D65, so no CAT is added. Unbounded target RGB and XYZ are computed first, then two mapping branches. This separates exact coordinate conversion from intentional colour change.

What this means in practice

Lowering saturation can bring the sample into the target cube. Before that, a correct matrix need not produce only positive components.

03

Why channel clipping also changes luminance

Per-channel clipping replaces negatives with zero and values above one with one. Unequal channel contributions to Y mean that saturation is not the only property affected: hue, light and colour differences can change too.

Clipping is a useful diagnostic for what a crude bounded conversion loses. Passing a 0…1 check does not prove appearance preservation. Inspect numerical changes and real footage.

What this means in practice

Compare ΔY after clipping and after the teaching compression. Zero ΔY in the second branch does not imply unchanged chromaticity.

04

Smooth compression and the untouched region

Compression may begin inside the hard boundary to avoid an abrupt transition. Some in-gamut saturation is traded for smoother out-of-gamut behaviour. Understand the threshold and which values stay unchanged.

This lab moves colour along a ray from neutral [Y,Y,Y] in target linear RGB. Distances below the threshold are untouched; larger distances compress smoothly toward the boundary. The simple method preserves Y for a valid neutral but does not claim an optimal visual compromise.

What this means in practice

Lower the threshold and observe less saturated samples being affected. More compression is not automatically more accuracy.

05

Preserving an RGB direction is not perceptual hue preservation

The same “move toward grey” means different paths in different coordinate systems. A straight line in linear RGB or xy is not guaranteed to have constant perceived hue. The perceptual result depends on the model and viewing conditions.

The lab therefore claims only its verifiable linear-Y invariant, not perceptual accuracy. ACES 2 performs its corresponding processing in perceptual polar coordinates with target constraints, a substantially more complete model.

What this means in practice

Compare red and blue at the same threshold. Similar numerical compression does not prove equal perceptual change.

06

A flat triangle does not describe colour volume

An xy diagram discards the absolute XYZ scale and shows chromaticity. It helps inspect primaries and shifts, but cannot alone establish whether a bright saturated stimulus fits a real screen. Light and channel constraints both matter.

Changing sample level keeps source chromaticity while changing distances to RGB-cube faces. The mapping can respond differently. Browser swatches are always limited to sRGB; for P3 this is an extra preview limit, not evidence that the calculation lacks P3 colours.

What this means in practice

Lower level at fixed saturation: the source xy point stays fixed while upper RGB-bound checks can change.

07

Rec.2020 to P3 or Rec.709

Wider primaries do not mean every pixel uses the full gamut. Many colours in a Rec.2020 file already fit Rec.709 and need not receive the same compression as extremes. Inspect content, not just the tag.

Compare two destinations for the same sample. The matrix and target cube change while the source stimulus remains fixed. Extremes often reveal larger differences; neutral is necessary but insufficient. A real screen may not fully cover the named target either.

What this means in practice

Set colour fraction to 0 for neutral, then raise it and compare green and cyan. Do not choose a conversion solely because grey matches.

08

Working-signal conditioning and final output differ

Scene-referred compression can tame difficult saturated values and improve downstream stability. Its purpose is not necessarily to place every value immediately inside a final display RGB 0…1 range.

Output mapping accounts for a concrete destination together with tone rendering. The two stages are not interchangeable because both mention gamut. Working-signal conditioning alone does not promise a finished Rec.709 image.

What this means in practice

Working values may remain extended after conditioning. Apply each stage’s requirements instead of inserting the same limiter everywhere.

09

ACES RGC and ACES 2 output compression

ACES 1.3 Reference Gamut Compression is a defined scene-referred conditioning algorithm with a trust region. Its specification does not require every output to lie inside AP1. That differs from a blanket promise to remove all out-of-gamut values.

ACES 2 Output Transform gamut compression operates within target-aware output rendering. Do not transfer one stage’s name or properties to the other. The lab’s ray model implements neither; it illustrates only its stated invariants.

What this means in practice

RGC in a working graph does not replace the correct Output Transform. Identify the ACES version and each stage’s responsibility.

10

Check input, output and order in Resolve

Before choosing gamut fitting, confirm the source primaries and transfer. An input-assignment error can look like excessive saturation; compensating compression merely hides the cause. Correct interpretation first.

Then identify processing already owned by the project, ACES or a CST. Avoid habitual extra limiters. Inspect neon, skin and gradients, including their interaction with tone compression. Available controls depend on Resolve mode and version.

What this means in practice

Bypass only the suspected duplicate limiter, not the entire chain. This isolates saturation loss without removing valid conversions.

11

Check more than boundary compliance

Check meaningful colour differences, boundary smoothness, neutrality, luminance and hues in real footage. A method may fit every pixel in the RGB cube while producing poor gradients or awkward highlight colours.

Diagrams and numbers help locate changes. Here, sRGB swatches may look identical after preview clipping even when their calculated XYZ differ. Do not infer numerical or perceptual equality from browser colour alone.

What this means in practice

Compare raw RGB, ΔY, xy positions and preview-clipping flags. They test different properties, not interchangeable versions of one result.

A MODEL YOU CAN CHECK

What each branch preserves

Keep the meaning, the calculation and the limitation together.

RGBtarget = Mtarget⁻¹ × Msource × RGBsource; RGBmapped = [Y,Y,Y] + s·(RGBtarget − [Y,Y,Y])

The lab derives s from distance to the target RGB-cube faces and smooth compression. For 0<Y<1 it preserves target linear Y, not guaranteed perceptual hue. This is not ACES RGC, ACES 2 or a Resolve algorithm. All swatches are additionally limited by the sRGB preview.

ConceptWhat it describesWhat not to conclude
MatrixThe source stimulus XYZ under matched assumptions.That output RGB must lie in 0…1.
ClippingOnly the specified per-channel bounds.That hue and Y remain unchanged.
Teaching rayLinear Y for a valid neutral and a smooth transition.That perceptual hue is preserved or ACES is implemented.
xy diagramChromaticity without absolute XYZ scale.That it shows the screen’s full colour volume.
sRGB swatchA limited preview of calculated XYZ.That every computed P3/Rec.2020 colour is physically displayed.

DO. OBSERVE. EXPLAIN.

Separate exact conversion from colour alteration

The lab source is linear Rec.2020/D65. Targets share the white point; no CAT is needed here.

  1. 01

    Find extended values

    Choose saturated green and Rec.709. Record raw RGB.

    CHECK

    I do not mistake negative components for a matrix bug.

  2. 02

    Compare branches

    Inspect xy and ΔY for clipping and compression.

    CHECK

    Y preservation is not mistaken for colour preservation.

  3. 03

    Change threshold and target

    Lower saturation, then threshold. Repeat with P3.

    CHECK

    I identified the unchanged region and explained threshold effects.

  4. 04

    Inspect preview limits

    Compare sRGB-preview flags with computed RGB and XYZ.

    CHECK

    The browser swatch is not treated as a monitor-gamut measurement.

Check your understanding

0 / 4

Tick only what you can explain yourself.

TEST THE EXPLANATION

A situation, not a trick question.

Answer first. Open the reasoning afterwards.

01Must the formula be fixed because matrix output R is negative?

Not necessarily. With valid inputs it may indicate a colour outside the target gamut. Verify input and destination before choosing a mapping.

02Does zero ΔY mean the colour is unchanged?

No. Only one quantity is preserved. The teaching compression changes chromaticity and makes no perceptual-identity claim.

03Can Output Transform be removed because ACES RGC is enabled?

No. Working-signal conditioning and output rendering have different responsibilities. RGC does not promise a finished bounded signal for any screen.

Avoid these shortcuts

  • Do not conflate ACES 1.3 RGC with ACES 2 output compression.
  • Matrix conversion, clipping and compression are distinct.
  • Different XYZ values can look identical after sRGB preview clipping.
COLOR / DAVINCI RESOLVE

From the model to your workflow.

Before applying the idea in Resolve, identify the input encoding, working space and delivery target. Establish one responsible output-conversion path and verify the rendered file through a compatible chain. Lab values explain the principle, but its SDR preview cannot replace HDR monitoring or certify delivery compliance.

Color Management ↗Scopes ↗Color Space Transform ↗

CHECK THE FOUNDATION

Sources and model limits.

Editorial review: 1 October 2026. Links identify the definitions and formulas; exercises are independent teaching examples.

  1. [2]
    ITU-R · BT.2408-9 (03/2026), §2–3, §9, Annex 5 ↗

    Current production references, white and graphics, monitoring. This edition’s Annex 5 contains the worked EETF; our teaching curve does not implement it.

  2. [6]
    ACES · Reference Gamut Compression specification ↗

    ACES 1.3 scene-referred conditioning and trust region; containing every value inside AP1 is not required.

  3. [7]
    ACES · Output Transform gamut compression ↗

    Target-aware perceptual polar processing. Distinguished from RGC and the lab’s simple ray method.

  4. [8]
    W3C · CSS Color 4, colour conversion and sample code ↗

    Primaries, linear RGB/XYZ conversion and sRGB preview. An evolving specification, not an HDR-monitor model.

  5. [9]
    Blackmagic Design · DaVinci Resolve Color ↗

    Colour-management and HDR architecture. Check version-specific controls and availability in installed Resolve; live exercises were not performed here.