Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

There is no single universal YUV-to-RGB formula. For digital video, the relevant format is usually Y′CbCr, and the correct conversion depends on its matrix (such as BT.601 or BT.709), range, and bit depth. The formulas below use nonlinear R′G′B′ values and identify where range scaling belongs; they do not, by themselves, convert transfer functions or color primaries.

What “YUV” means in digital video

YUV originally describes an analog color-difference representation. Digital video is generally represented as Y′CbCr: Y′ is nonlinear luma, while Cb and Cr are blue- and red-difference chroma components. People often call digital Y′CbCr “YUV,” but the terms are not interchangeable in every technical context. Microsoft’s overview of YUV video explains the video convention.

The matrix equations relate nonlinear R′G′B′ signals to Y′CbCr. They are not a complete color-management pipeline: transfer-function handling and conversion between RGB primary sets are separate operations, normally performed in linear RGB where required. Khronos describes color conversion as a sequence of distinct operations in its OpenVX specification.

General normalized Y′CbCr equations

For normalized nonlinear red, green, and blue values R′, G′, and B′ in [0,1], choose matrix coefficients Kr and Kb. Set Kg = 1 − Kr − Kb. Then calculate:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
  • Y′ = KrR′ + KgG′ + KbB′
  • Cb = (B′ − Y′) / (2(1 − Kb))
  • Cr = (R′ − Y′) / (2(1 − Kr))

These equations produce normalized components; they are not 8-bit code values. For limited-range 8-bit video, map Y′ to nominal codes 16–235 and chroma to nominal codes 16–240, with neutral chroma at 128. At bit depth M, the nominal offsets and spans scale by 2(M−8). State the matrix, range, bit depth, and whether inputs are normalized or code values before using coefficients. Microsoft documents the code ranges in its YUV video overview and recommended 8-bit YUV formats.

Matrix coefficients: BT.601, BT.709, and BT.2020

The matrix family sets the luma weights. BT.601 and BT.709 coefficients are documented by Microsoft and Linux kernel documentation; libyuv also provides implementation reference coefficients for those families and BT.2020. The values below are normalized coefficients, not a promise that every implementation uses identical fixed-point integers.

Matrix family Kr Kg Kb
BT.601 0.299 0.587 0.114
BT.709 0.2126 0.7152 0.0722
BT.2020 non-constant-luminance example 0.2627 0.6780 0.0593

References: Microsoft’s 8-bit YUV format documentation, Linux kernel 4.9 colorspace documentation, and libyuv’s coefficient implementation. The Linux page is version 4.9; use the applicable current standard or implementation documentation for conformance work.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Using BT.601 coefficients to decode BT.709 material, or vice versa, can shift colors because the luma weights differ. A BT.601-to-BT.709 change may also require converting between their RGB primaries; changing only the matrix coefficients is not necessarily a complete color-space conversion.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

BT.601 RGB-to-Y′CbCr for 8-bit limited-range video

Normalized equations with range mapping

For normalized nonlinear R′, G′, and B′, BT.601 uses Kr = 0.299, Kb = 0.114, and Kg = 0.587. Calculate luma and normalized color differences, then map to limited-range code values:

  1. Y′ = 0.299R′ + 0.587G′ + 0.114B′
  2. Pb = 0.5(B′ − Y′) / (1 − 0.114)
  3. Pr = 0.5(R′ − Y′) / (1 − 0.299)
  4. Ycode = 16 + 219Y′; Cbcode = 128 + 224Pb; Crcode = 128 + 224Pr

The resulting nominal 8-bit ranges are Y′ 16–235 and Cb/Cr 16–240. Values outside nominal ranges can occur as headroom or footroom in formats and workflows that permit them.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Approximate integer shortcut

For 8-bit computer RGB input and 8-bit BT.601 output, Microsoft gives this approximate fixed-point form. R, G, and B are code values from 0 to 255; the right shift and offsets produce limited-range Y, Cb, and Cr codes:

  • Y = ((66R + 129G + 25B + 128) >> 8) + 16
  • Cb = ((−38R − 74G + 112B + 128) >> 8) + 128
  • Cr = ((112R − 94G − 18B + 128) >> 8) + 128

This is an approximation for that specific input, output, matrix, and range—not a universal RGB-to-video conversion. See Microsoft’s format equations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

BT.601 limited-range Y′CbCr-to-RGB for 8-bit codes

For 8-bit limited-range BT.601 input, let C = Y − 16, D = Cb − 128, and E = Cr − 128. Then compute and clip each output to [0,255]:

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
  • R = clip(round(1.164383C + 1.596027E))
  • G = clip(round(1.164383C − 0.391762D − 0.812968E))
  • B = clip(round(1.164383C + 2.017232D))

These inverse coefficients apply to limited-range BT.601 code values. They are not appropriate for BT.709, BT.2020, or full-range input. libyuv gives a closely rounded implementation reference for BT.601 limited range: R=(Y−16)×1.164+V×1.596, G=(Y−16)×1.164−U×0.391−V×0.813, B=(Y−16)×1.164+U×2.018, where U and V are chroma centered at zero. See libyuv’s implementation coefficients and Microsoft’s format documentation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Full range and limited range are different conversions

For 8-bit limited-range video, nominal luma is 16–235, chroma is 16–240, and neutral chroma is 128. Full-range formats use different offsets and scaling. For example, libyuv labels its BT.601 full-range conversion path “JPEG” and supplies a distinct inverse formula. Do not decode limited-range samples with full-range coefficients or the reverse; use the range signaled by the format or metadata, and match the conversion to it. Nominal ranges do not necessarily exclude values in headroom or footroom.

Chroma subsampling is a separate step

In 4:2:2 or 4:2:0 video, fewer chroma samples are stored than luma samples. The matrix still defines the relationship between components, but RGB reconstruction also needs chroma upsampling and the correct chroma sample placement. Microsoft recommends converting 4:2:0 or 4:2:2 data to 4:4:4 before RGB conversion in its YUV video overview. Chroma subsampling—not the Y′CbCr matrix itself—is what reduces the chroma data volume relative to full-resolution components.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Choose the right formula before coding

Check the source format or metadata for each of these parameters rather than guessing from the pixel values:

  • Matrix: BT.601, BT.709, or BT.2020 (and, for BT.2020, whether the format uses non-constant luminance).
  • Range: full or limited/studio.
  • Bit depth: code-value scaling changes with depth.
  • Direction: RGB to Y′CbCr or Y′CbCr to RGB.
  • Signal form: nonlinear R′G′B′ for the matrix equations, not unconverted linear RGB.
  • Sampling: 4:4:4 or subsampled chroma requiring reconstruction.
  • Color management: whether transfer-function or primary conversion is also needed.

Once these match the source, choose the corresponding forward or inverse equations. A coefficient set alone cannot resolve unknown range, bit depth, or chroma layout.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.