{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/reference/colorimetry/primaries",
  "collection": "docs",
  "title": "Color Primaries",
  "description": "What the color primaries tag means, the H.273 code points for BT.709, BT.601, BT.2020 and P3, and why retagging cannot widen or narrow a gamut.",
  "canonicalUrl": "https://encode.wiki/reference/colorimetry/primaries/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/reference/colorimetry/primaries.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/reference/colorimetry/primaries.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "ITU-T H.273 (07/2024), Table 2 — color primaries",
      "url": "https://www.itu.int/rec/T-REC-H.273-202407-I",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "ITU-R BT.709 — HDTV parameter values",
      "url": "https://www.itu.int/rec/R-REC-BT.709",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "ITU-R BT.2020 — UHDTV parameter values",
      "url": "https://www.itu.int/rec/R-REC-BT.2020",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg n9.0.2 color property names (libavutil/pixdesc.c)",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavutil/pixdesc.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "VapourSynth R81 resize documentation (primaries table)",
      "url": "https://github.com/vapoursynth/vapoursynth/blob/R81/doc/functions/video/resize.rst",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "x265 command-line options (--master-display P3-D65 example)",
      "url": "https://github.com/Multicorewareinc/x265/blob/4.3/doc/reST/cli.rst",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "mpv v0.41.0 color guessing (video/csputils.c)",
      "url": "https://github.com/mpv-player/mpv/blob/v0.41.0/video/csputils.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/colorimetry/primaries.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/colorimetry/primaries.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "Code points",
      "anchor": "code-points"
    },
    {
      "depth": 2,
      "text": "Practical notes",
      "anchor": "practical-notes"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/reference/colorimetry/primaries/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/reference/colorimetry/primaries/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/reference/colorimetry/primaries/_preamble.md",
      "checksum": "8da24c39390117c87d485a2d9308a4a40818cca913755c5057096c33cfe5d896",
      "bytes": 516
    },
    {
      "id": "code-points",
      "title": "Code points",
      "depth": 2,
      "anchor": "code-points",
      "canonicalUrl": "https://encode.wiki/reference/colorimetry/primaries/#code-points",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/reference/colorimetry/primaries/code-points.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/reference/colorimetry/primaries/code-points.md",
      "checksum": "b266b279c88c70add5adaa7cbf56b0e2ca02a27fafc7ac0333a7926282174bc3",
      "bytes": 1568
    },
    {
      "id": "practical-notes",
      "title": "Practical notes",
      "depth": 2,
      "anchor": "practical-notes",
      "canonicalUrl": "https://encode.wiki/reference/colorimetry/primaries/#practical-notes",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/reference/colorimetry/primaries/practical-notes.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/reference/colorimetry/primaries/practical-notes.md",
      "checksum": "3990fd1315899c8c1f7c0626d1de04b7067d1384ec442e9e09b42b0b1c3b80f5",
      "bytes": 1558
    }
  ],
  "outboundReferences": [
    "/guides/preserve-color-and-hdr/#sd-bt601-to-hd-bt709",
    "/hdr/#tone-map-hdr-to-sdr",
    "/reference/colorimetry/matrix/",
    "/reference/colorimetry/transfer/"
  ],
  "checksum": "288711ca56b1d934c20d2bb05d22387b1ed902fe892e1cce8d3b68fec8a30519",
  "contentFormat": "markdown",
  "markdown": "Color primaries say which exact red, green and blue the RGB values refer to, plus the white point. Together they define the gamut: the triangle of colors the signal can express. ffprobe reports them as `color_primaries`.\n\nPrimaries are a separate property from the [transfer function](/reference/colorimetry/transfer/) and the [matrix](/reference/colorimetry/matrix/), but each video system uses a fixed set, so in practice the three tags usually agree: BT.709 everywhere for HD, BT.2020 everywhere for UHD and HDR.\n\n## Code points\n\n| Code | FFmpeg name | System | Where you see it |\n| --- | --- | --- | --- |\n| 1 | `bt709` | BT.709; also the sRGB primaries | HD video, web video, sRGB images |\n| 2 | `unknown` | Not specified | Untagged files; the player guesses |\n| 4 | `bt470m` | BT.470 System M | Obsolete NTSC |\n| 5 | `bt470bg` | BT.470 System B/G, BT.601 625-line | PAL/SECAM SD and DVD |\n| 6 | `smpte170m` | SMPTE 170M, BT.601 525-line | NTSC SD and DVD |\n| 7 | `smpte240m` | SMPTE 240M; same as 6 | Obsolete |\n| 8 | `film` | Generic film, illuminant C | Rare |\n| 9 | `bt2020` | BT.2020 / BT.2100 | UHD SDR, HDR10, HLG, Dolby Vision |\n| 10 | `smpte428` | CIE 1931 XYZ (SMPTE ST 428-1) | Digital cinema distribution masters |\n| 11 | `smpte431` | DCI-P3, DCI white point | Cinema |\n| 12 | `smpte432` | P3 with D65 white (P3-D65) | Display P3 content, Apple devices |\n| 22 | `ebu3213` | EBU Tech 3213-E / JEDEC P22 | Rare |\n\nThe chromaticities you need most often, for example when writing HDR mastering metadata:\n\n| Primaries | Red (x, y) | Green (x, y) | Blue (x, y) | White (x, y) |\n| --- | --- | --- | --- | --- |\n| BT.709 / sRGB | 0.640, 0.330 | 0.300, 0.600 | 0.150, 0.060 | D65: 0.3127, 0.3290 |\n| BT.601 525 (SMPTE 170M) | 0.630, 0.340 | 0.310, 0.595 | 0.155, 0.070 | D65 |\n| BT.2020 | 0.708, 0.292 | 0.170, 0.797 | 0.131, 0.046 | D65 |\n| P3 (DCI and D65) | 0.680, 0.320 | 0.265, 0.690 | 0.150, 0.060 | D65, or DCI 0.314, 0.351 |\n\nSVT-AV1 calls code 6 `bt601` and code 7 `smpte240`; VapourSynth uses `170m`, `2020`, `st432-1`, and so on. The number is the same everywhere.\n\n## Practical notes\n\n**Untagged SD.** NTSC and PAL primaries differ slightly from BT.709. Players guess when the tag is missing — mpv picks BT.709 for anything 1280 wide or over 576 high, PAL for 576 lines and NTSC for 480 or 486 — so tag SD encodes with the source system or convert them when upscaling (see [the color guide](/guides/preserve-color-and-hdr/#sd-bt601-to-hd-bt709)).\n\n**BT.2020 is a container, not the content's real gamut.** Most HDR is graded on a P3-D65 monitor and delivered in BT.2020. The stream is tagged `bt2020`; the mastering-display metadata records P3. Don't tag such a stream `smpte432` because the grade was P3 — the samples are BT.2020 values.\n\n**BT.2020 does not mean HDR.** UHD SDR also uses BT.2020 primaries. Whether a stream is HDR is decided by the [transfer](/reference/colorimetry/transfer/) (`smpte2084` or `arib-std-b67`).\n\n**P3 variants.** DCI-P3 and P3-D65 share primaries but differ in white point. Apple's Display P3 is P3-D65 primaries with the sRGB transfer, so it is tagged `smpte432` plus `iec61966-2-1`.\n\n**Retagging does not change the gamut.** Tagging BT.709 pixels as `bt2020` makes every color look oversaturated; tagging BT.2020 pixels as `bt709` makes them look dull. Going from a wide gamut to a narrow one is a real conversion that has to decide what to do with colors outside the smaller triangle — use `zscale`, `libplacebo` or VapourSynth `resize` with explicit input and output primaries, and tone-map at the same time if the source is HDR (see [tone mapping](/hdr/#tone-map-hdr-to-sdr)).\n"
}
