Home > @csstools/css-color-parser > serializeP3
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;|
Parameter |
Type |
Description |
|---|---|---|
|
color |
The color data to be serialized. | |
|
gamutMapping |
boolean |
(Optional) Whether to perform gamut mapping, defaults to |
FunctionNode
{FunctionNode} The serialized color data as a FunctionNode object.