Skip to main content

Module color

Module color 

Source
Expand description

Color space and related type definitions.

This module provides enums for color-related metadata commonly found in video streams, including color space, color range, and color primaries.

§Examples

use ff_format::color::{ColorSpace, ColorRange, ColorPrimaries};

// HD video typically uses BT.709
let space = ColorSpace::Bt709;
let range = ColorRange::Limited;
let primaries = ColorPrimaries::Bt709;

assert!(space.is_hd());
assert!(!range.is_full());

Enums§

ColorPrimaries
Color primaries defining the color gamut (the range of colors that can be represented).
ColorRange
Color range defining the valid range of color values.
ColorSpace
Color space (matrix coefficients) for YUV to RGB conversion.