Skip to content

Latest commit

 

History

History
71 lines (34 loc) · 1.02 KB

File metadata and controls

71 lines (34 loc) · 1.02 KB

Home > @csstools/css-color-parser > serializeP3

serializeP3() function

Convert color data to component values in the display-p3 color space. The return value can be converted to a string by calling toString() on it.

Signature:

export declare function serializeP3(color: ColorData, gamutMapping?: boolean): FunctionNode;

Parameters

Parameter

Type

Description

color

ColorData

The color data to be serialized.

gamutMapping

boolean

(Optional) Whether to perform gamut mapping, defaults to true.

**Returns:**

FunctionNode

{FunctionNode} The serialized color data as a FunctionNode object.