Skip to main content

Description

ColorBars is a filter for generating test signals. The output is a single frame of color bars according to SMPTE RP 219-1, 219-2, or ITU-R BT.2111-2. For NTSC, the bar pattern is described in SMPTE EG 1. For PAL, EBU bars are generated.

SMPTE RP 219-2 gives explicit color bar values in 10-bit and 12-bit Y'Cb'Cr'. ITU BT.2111-2 gives explicit color bar values in 10-bit and 12-bit R'G'B'. These values are used directly instead of being generated at runtime.

Usage

colorbars.ColorBars([int resolution=3, int format=vs.YUV444P12, int hdr=0, int wcg=0, int compatability=2, int subblack=1, int superwhite=1, int iq=1, int halfline=0])
  • resolution: Ten different systems are supported as follows

    • 0 - NTSC (BT.601)
    • 1 - PAL (BT.601)
    • 2 - 720p
    • 3 - 1080i/p
    • 4 - 2K
    • 5 - UHDTV1/UHD
    • 6 - 4K
    • 7 - UHDTV2/8K
    • 8 - NTSC (4fsc)
    • 9 - PAL (4fsc)
  • format: Either vs.YUV444P10 or vs.YUV444P12 are supported in SDR mode. Either vs.RGB30 or vs.RGB36 are supported in HDR mode. This is because SMPTE defines bar values in terms of Y'Cb'Cr' and ITU uses R'G'B'.

  • hdr: Non-zero values enable BT.2111 HDR mode as follows

    • 0 - SDR
    • 1 - HLG
    • 2 - PQ
    • 3 - PQ (full range)
  • wcg: Enable ITU-R BT.2020, aka wide color gamut. Only valid with UHD and higher resolutions. Required for 8K, although ColorBars does not enforce this and will generate 8K Rec.709 with a warning. No effect when hdr > 0.

  • compatability: Controls how pedantic you want to be, especially for legacy NTSC/PAL systems. No effect when hdr > 0.

    • 0 - Use ideal bar dimensions, rounded to the nearest integer. Bar widths are specified as fractions of the active picture and can be odd.
    • 1 - Use even bar dimensions to facilitate chroma subsampling. Conversions to YUV420 or YUV422 later may be problematic otherwise.
    • 2 - For NTSC and PAL, ignore blanking. The entire line contains the active image. For HD and higher resolutions, use dimensions that are compatible with chroma subsampling and with 4:3 center-cut downconversion. For UHD/4K and 8K, use multiples of four and eight respectively for 2SI compatibility.

NTSC and PAL both have an active digital width of 720 pixels when using BT.601 (13.5 MHz) sampling. 525-line NTSC has 710.85x484 active picture plus two half lines. 712 is used in modes 0 and 1 with 4 blanking pixels on each side. 625-line PAL has 702x574 active picture plus two half lines. 702 is used in mode 0, with 9 blanking pixels on each side. 704 is used in mode 1, with 8 blanking pixels on each side.

4fsc NTSC (14.318 MHz) has 768 digital active samples. 757.27 samples are active (52+8/9 us). Mode 0 is 758 wide with 5 blanking pixels on each side. Mode 1 is 760 wide with 4 blanking pixels on each side. 4fsc PAL (17.734 MHz) has 948 digital active samples. 922 samples are active (52 us) in modes 0 and 1 with 12 blanking pixels on each side.

NTSC modes 0 and 1 have 486 active lines. DVB/ATSC/DV/HDMI use 480 lines, like in mode 2.

  • subblack: Controls whether to generate the below black ramp in the middle third of the first 0% black patch on the bottom row. Only valid with HD and higher resolutions. No effect when hdr > 0.

  • superwhite: Controls whether to generate an above white ramp in the middle third of the 100% white chip on the bottom row. Only valid with HD and higher resolutions. No effect when hdr > 0.

  • iq: Controls the second patch of rows 2 and 3. Only valid with HD and higher resolutions. No effect when hdr > 0. Mode 1 and 2 are not valid if wcg=1.

    • 0 - 75% white and 0% black
    • 1 - -I and +Q
    • 2 - +I and 0% black
    • 3 - 100% white and 0% black

The +I/-I/+Q values are conveniently specified in RP 219 for systems with Rec.709 primaries (HD up to 4K). For NTSC, the values were calculated and later verified to match an Evertz SDI test signal generator. Note that converting from YUV to RGB will produce out of range values.

  • halfline: For ultimate pedantry, perform halfline blanking on analog lines 284/263 (NTSC) and 23/623 (PAL). Applies to NTSC and PAL resolutions only.

Examples

Note that bar transitions are not instant. RP 219 requires proper shaping. Rise and fall times are 4 samples (10% to 90%) and +/-10% of the nominal value and the shape is recommended to be an integrated sine-squared pulse. Shaping may be integrated into ColorBars later, but for now you can apply a horizontal blur.

# Generate 30 seconds of 1080i HD bars
c = core.colorbars.ColorBars(format=vs.YUV444P10)
c = core.std.SetFrameProp(clip=c, prop="_FieldBased", intval=vs.FIELD_TOP)
c = core.std.Convolution(c,mode="h",matrix=[1,2,4,2,1])
c = core.resize.Point(clip=c,format=vs.YUV422P10)
c = c * (30 * 30000 // 1001)
c = core.std.AssumeFPS(clip=c, fpsnum=30000, fpsden=1001)

# Generate 60 seconds of annoyingly "correct" NTSC bars
c = core.colorbars.ColorBars(format=vs.YUV444P12, resolution=0, compatability=0)
c = core.std.SetFrameProp(clip=c, prop="_FieldBased", intval=vs.FIELD_BOTTOM)
c = core.std.Crop(c, 4, 4)
c = core.std.Convolution(c,mode="h",matrix=[1,2,4,2,1])
c = core.resize.Point(clip=c,format=vs.YUV422P8)
c = c * (60 * 30000 // 1001)
c = core.std.AssumeFPS(clip=c, fpsnum=30000, fpsden=1001)

# Generate UHD Bars with Rec.2020 primaries
c = core.colorbars.ColorBars(format=vs.YUV444P12, resolution=5, wcg=1)
c = core.std.Convolution(c,mode="h",matrix=[1,2,4,2,1])
c = core.resize.Point(clip=c,format=vs.YUV422P10)
c = core.std.AssumeFPS(clip=c, fpsnum=50, fpsden=1)

# Generate HLG UHD Bars
c = core.colorbars.ColorBars(format=vs.RGB30, resolution=5, hdr=1)
c = core.std.Convolution(c,mode="h",matrix=[1,2,4,2,1])
c = core.resize.Point(clip=c,format=vs.YUV422P10,matrix_s="2020ncl")

Installation

pip

pip install vapoursynth-colorbars

Meson (from source)

meson setup build
meson compile -C build

Requires VapourSynth >= R74.

Windows (MinGW-w64 one-shot)

gcc -shared -o colorbars.dll colorbars.c -I include/vapoursynth -O3 -std=c99 -Wall

Metadata

Release files for vapoursynth-colorbars 5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vapoursynth-colorbars 5
File Size Uploaded
vapoursynth_colorbars-5.tar.gz 22.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for vapoursynth-colorbars 5
File
vapoursynth_colorbars-5-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
vapoursynth_colorbars-5-py3-none-musllinux_1_2_x86_64.whl Python 3 none Linux musl 1.2+ x86-64 Details
vapoursynth_colorbars-5-py3-none-musllinux_1_2_aarch64.whl Python 3 none Linux musl 1.2+ ARM64 Details
vapoursynth_colorbars-5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 Details
vapoursynth_colorbars-5-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
vapoursynth_colorbars-5-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
vapoursynth_colorbars-5-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details

Total release size: 256.6 kB

Release files / vapoursynth_colorbars-5.tar.gz

Download URL vapoursynth_colorbars-5.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
dc2724792aabd025b53ed2310046c1d520540ca121f2016a52a6f094c12c8013
BLAKE2b-256 checksum
How to use checksums
6fc6a44288073b750b9d718f69c153722beb514676a06c82313d1048264b3e0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / vapoursynth_colorbars-5-py3-none-win_amd64.whl

Download URL vapoursynth_colorbars-5-py3-none-win_amd64.whl
Size 31.6 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
d7c891bfaebe32dd0e4c53fedf23b21e1b6023f9142573592fac5b5ae0fb25c7
BLAKE2b-256 checksum
How to use checksums
e2b3ea9ddf6cc67b2f7c186cd6214d79e53671fc1a4e583da0102c02b1d5517f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / vapoursynth_colorbars-5-py3-none-musllinux_1_2_x86_64.whl

Download URL vapoursynth_colorbars-5-py3-none-musllinux_1_2_x86_64.whl
Size 29.9 kB
Tags Linux musl 1.2+ x86-64 Python 3
SHA-256 checksum
How to use checksums
2b3835585d632dc7283c91acfc51d4895e00817e5d3846bf30b8257ccc650f98
BLAKE2b-256 checksum
How to use checksums
5d4155955bdb32fb59246c2fb788117257d0a73abf16de3eca0974fb4a280206
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / vapoursynth_colorbars-5-py3-none-musllinux_1_2_aarch64.whl

Download URL vapoursynth_colorbars-5-py3-none-musllinux_1_2_aarch64.whl
Size 30.0 kB
Tags Linux musl 1.2+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f98ebf633b55b1969641338c40daaff25ea41eae796daf6ba6ae38577e552b00
BLAKE2b-256 checksum
How to use checksums
c5d9988241a463e1c1f44e67e48837e563cce4f478e9689afc14a56f5b3702bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / vapoursynth_colorbars-5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL vapoursynth_colorbars-5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 30.3 kB
Tags Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
783f4895e318da02c2bb4f7b0752c992495b5cfcca1c02f7e14ca1318b56f7f1
BLAKE2b-256 checksum
How to use checksums
5f8fa5286f9969ce5ab29963b23db60969f8a07d3c5eef81cd6f1f724d0712da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / vapoursynth_colorbars-5-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL vapoursynth_colorbars-5-py3-none-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 29.6 kB
Tags Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64 Python 3
SHA-256 checksum
How to use checksums
dec0d8bc571abd393736d8d11430c9cce93f40cb3d256c90783780e43f51e76f
BLAKE2b-256 checksum
How to use checksums
bdc201415b634ad672961a8b128034ed493aaebe4bd5b51dc8692ca570fd5ba2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / vapoursynth_colorbars-5-py3-none-macosx_11_0_arm64.whl

Download URL vapoursynth_colorbars-5-py3-none-macosx_11_0_arm64.whl
Size 36.9 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b7f80514c8d6d8e445d0e8fdf54d21628eb90411f127cf29336e17ef708e1982
BLAKE2b-256 checksum
How to use checksums
fa8bf29e637ff8be013b13660a9ac92c67c06344386f9120af6801bd6ed3eceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / vapoursynth_colorbars-5-py3-none-macosx_10_15_x86_64.whl

Download URL vapoursynth_colorbars-5-py3-none-macosx_10_15_x86_64.whl
Size 46.4 kB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
775c9db9ffeafe25ef13bc348697f38bf34a98321ea2156d4954b12532916b7a
BLAKE2b-256 checksum
How to use checksums
b781da2c04b9bb0671fc09dd252ad6d9583396f4718a010b6500ddb6723b0579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release history Release notifications | RSS feed

6

8 release files

This release

5 This release

8 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page