Skip to main content

VideoColorSpace

The VideoColorSpace interface of the WebCodecs API represents the color space of a video.

MDN Reference

Methods

toJSON()

toJSON(): VideoColorSpaceInit;

The toJSON() method of the VideoColorSpace interface is a serializer that returns a JSON representation of the VideoColorSpace object.

MDN Reference

Returns

VideoColorSpaceInit

Properties

fullRange

readonly fullRange: boolean | null;

The fullRange read-only property of the VideoColorSpace interface returns true if full-range color values are used.

MDN Reference


matrix

readonly matrix: VideoMatrixCoefficients | null;

The matrix read-only property of the VideoColorSpace interface returns the matrix coefficient of the video. Matrix coefficients describe the relationship between sample component values and color coordinates.

MDN Reference


primaries

readonly primaries: VideoColorPrimaries | null;

The primaries read-only property of the VideoColorSpace interface returns the color gamut of the video.

MDN Reference


transfer

readonly transfer:
| VideoTransferCharacteristics
| null;

The transfer read-only property of the VideoColorSpace interface returns the opto-electronic transfer characteristics of the video.

MDN Reference