---
title: "VideoColorSpace | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface VideoColorSpace

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace)

interface VideoColorSpace {  
    [fullRange](#fullrange): boolean | null;  
    [matrix](#matrix): [VideoMatrixCoefficients](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.VideoMatrixCoefficients/) | null;  
    [primaries](#primaries): [VideoColorPrimaries](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.VideoColorPrimaries/) | null;  
    [transfer](#transfer): [VideoTransferCharacteristics](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.VideoTransferCharacteristics/) | null;  
    [toJSON](#tojson-1)(): [VideoColorSpaceInit](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.VideoColorSpaceInit/);  
}

##### Index

### Properties[](#properties)

[fullRange](#fullrange) [matrix](#matrix) [primaries](#primaries) [transfer](#transfer)

### Methods[](#methods)

[toJSON](#tojson)

## Properties[](#properties-1)

### `Readonly`fullRange[](#fullrange)

fullRange: boolean | null

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/fullRange)

### `Readonly`matrix[](#matrix)

matrix: [VideoMatrixCoefficients](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.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](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/matrix)

### `Readonly`primaries[](#primaries)

primaries: [VideoColorPrimaries](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.VideoColorPrimaries/) | null

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/primaries)

### `Readonly`transfer[](#transfer)

transfer: [VideoTransferCharacteristics](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.VideoTransferCharacteristics/) | null

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

[MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/transfer)

## Methods[](#methods-1)

### toJSON[](#tojson)

-   toJSON(): [VideoColorSpaceInit](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.VideoColorSpaceInit/)[](#tojson-1)
    
    The **`toJSON()`** method of the VideoColorSpace interface is a serializer that returns a JSON representation of the VideoColorSpace object.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/toJSON)
    
    #### Returns [VideoColorSpaceInit](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.VideoColorSpaceInit/)
