Skip to content

Latest commit

 

History

History
154 lines (71 loc) · 2.19 KB

File metadata and controls

154 lines (71 loc) · 2.19 KB

Home > @csstools/css-color-parser

css-color-parser package

Enumerations

Enumeration

Description

ColorNotation

SyntaxFlag

Functions

Function

Description

color(colorNode)

Convert a color function to a ColorData object.

colorDataFitsDisplayP3_Gamut(x)

Check if a color data object fits the display-p3 gamut.

colorDataFitsRGB_Gamut(x)

Check if a color data object fits the sRGB gamut.

serializeHSL(color, gamutMapping)

serializeOKLCH(color)

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

serializeP3(color, gamutMapping)

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.

serializeRGB(color, gamutMapping)

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

Interfaces

Interface

Description

ColorData

A color data object. It contains as much information as possible about the color and the original parsed syntax.