VideoColorSpace
WebCodecs APIwindowanddedicated
WebCodecs APIwindow_and_dedicated
The **`VideoColorSpace`** interface of the represents the color space of a video.
## Constructor
- VideoColorSpace()
- : Creates a new `VideoColorSpace` object.
## Instance properties
- VideoColorSpace.primaries
- : A string containing the color primary describing the color gamut of a video sample.
- VideoColorSpace.transfer
- : A string containing the transfer characteristics of video samples.
- VideoColorSpace.matrix
- : A string containing the matrix coefficients describing the relationship between sample component values and color coordinates.
- VideoColorSpace.fullRange
- : A Boolean. If `true` indicates that full-range color values are used.
## Instance methods
- VideoColorSpace.toJSON()
- : Returns a JSON-serializable plain object representing the `VideoColorSpace` object. Automatically called by JSON.stringify().
## Examples
In the following example, `colorSpace` is a `VideoColorSpace` object returned from VideoFrame. The object is then printed to the console.
```js
let colorSpace = VideoFrame.colorSpace;
console.log(colorSpace);
```
## Specifications
## Browser compatibility
Cite this
"VideoColorSpace". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/VideoColorSpace JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy