Colour science/03/Digital representation

Digital representation

RGB and digital colour

What R, G and B actually mean: additive primaries, linear light, transfer functions, code values, matrices and why 255,0,0 without a colour space does not define one specific red.

Additive RGBPrimariesLinear lightCode valuesMatrices
In plain language

RGB is a set of three coordinates inside a predefined system. Until the primaries, white point and signal encoding are known, three RGB numbers do not uniquely define the light a display should emit.

10 sections2 primary references

Quick reference

Definitions and numbers worth keeping in view

Model
3 additive primaries

R/G/B are contributions of the primaries of a specific system.

Without context
255,0,0 is ambiguous

Colour space, transfer/encoding and range are required.

Linear RGB
Values ∝ light

Critical for physically meaningful compositing and interpolation.

Alpha
Transparency / coverage

It is not a fourth colour primary.

Additive RGB
RGB
add light

The exact red, green and blue are defined by the colour space — these labels are not universal spectral colours.

One number, two meanings

0.5 encoded ≠ 0.5 linear light

encoded RGB0.50
linear lightdepends on transfer
255,0,0
code value
Rec.709
meaning A
Rec.2020
meaning B
01

RGB is an additive light model

A display creates colour by adding light from three primaries. Zero in all channels means no contribution from those primaries, while increasing channels adds emitted light. This is fundamentally different from subtractive printing models in which dyes remove parts of the incoming spectrum.

02

R, G and B are not universal colours of nature

Every RGB system defines the chromaticities of its red, green and blue primaries. Rec.709, Display P3 and Rec.2020 use different coordinates, so R=1, G=0, B=0 describes different reds in those spaces. The letter R names a channel in a system, not one physically fixed shade.

03

RGB numbers are coordinates, not absolute colour

The triplet 255,0,0 only says that the first channel is at its maximum and the other two are zero in a particular encoding. Without the colour space, transfer function, bit depth and range, the description is incomplete. The same hex value can therefore be reproduced physically differently across differently managed systems and displays.

04

Linear RGB: when numbers are proportional to light

In linear-light RGB, doubling a channel value doubles that primary's contribution to physical light intensity. Many blending, blur, compositing and physically meaningful interpolation operations are correct in linear light. But storing images directly in linear form at limited bit depth is not always efficient.

05

Why ordinary RGB signals are often nonlinear

A transfer function redistributes code values relative to light. Historically this was tied to CRT behaviour; today it also helps use code values efficiently and build a consistent camera → signal → display system. sRGB, BT.709-style camera encoding, gamma 2.4 display response, PQ, HLG and log curves are different things even though interfaces often group them under a Gamma menu.

06

0–1, 0–255 and 64–940 are different ways to encode a similar idea

Floating-point workflows often normalise RGB to 0–1, 8-bit graphics use 0–255, while 10-bit video range normally reserves code values outside nominal black and white. These numbers describe encoding but do not by themselves change the primaries or white point.

07

How RGB moves from one space to another

If two RGB systems are defined through CIE coordinates and white points, linear RGB can be transformed through matrices, often using XYZ as an intermediate. If the white points differ, chromatic adaptation may be required. If the target gamut is smaller than the source, a matrix alone does not guarantee graceful out-of-gamut behaviour, which is where gamut mapping enters.

08

Negative and >1 values are not always errors

In wide scene-referred working spaces, real colours can temporarily acquire negative RGB components or values above nominal 1.0 after transforms. In a floating-point pipeline this can be a valid intermediate state. The problem begins when those values reach a limited display-referred output uncontrolled and clip.

09

Alpha is not a fourth colour channel

Alpha normally describes transparency or coverage. In premultiplied representation, RGB has already been multiplied by alpha; in straight/unpremultiplied representation it is stored independently. This matters greatly for compositing, but alpha does not expand the colour gamut and is not another primary.

10

What RGB means inside Resolve

In Resolve, the same pixel can successively exist as camera-space RGB, timeline/working RGB and output/display RGB. The question 'what are the RGB values here?' should therefore always be followed by 'which colour space and gamma is this node using at this point in the pipeline?'

What this changes in post

The main practical rule is simple: RGB without context is just numbers. Before any CST, LUT or manual transform, first establish what those numbers mean at the input.

Common mistakes
Treating 255,0,0 as one universal red.
Confusing linear RGB with gamma/log-encoded RGB.
Treating alpha as a fourth primary.
Clipping negative or >1 working values too early.
Standards and primary references

Technical definitions are anchored to standards bodies and primary specifications wherever that distinction matters.