@tempots/color
The @tempots/color library provides a set of immutable color classes and functions to convert between color spaces.
color package
Classes
Class |
Description |
---|---|
Represents a color in the CMYK color model. | |
Represents a color in the HSL (Hue, Saturation, Lightness) color model. | |
Represents the HSLA color model. | |
Represents a color in the HSLuv color space. | |
Represents a color in the HSV (Hue, Saturation, Value) color model. | |
Represents a color in the CIELAB color space. | |
Represents a color in the LCH color space. | |
Represents a color in the LUV color space. | |
Represents a color in the RGB color model. | |
Represents a color in the RGBA format. | |
Represents a color in the sRGB color space. | |
Represents a color in the XYZ color space. |
Functions
Function |
Description |
---|---|
| |
| |
Converts a CMYK color to an HSL color. | |
Converts a CMYK color to an HSLuv color. | |
Converts a CMYK color to an HSV color. | |
Converts a CMYK color to LAB color using a specified white reference. | |
Converts a CMYK color to LCH color. | |
Converts a CMYK color to LUV color space. | |
Converts a CMYK color to an RGB color. | |
Converts a CMYK color to an sRGB color. | |
Converts a CMYK color to XYZ color space. | |
| |
Converts an HSL color to CMYK color. | |
Converts an HSL color to an HSLuv color. | |
Converts an HSL color to HSV color. | |
Converts an HSL color to LAB color. | |
Converts an HSL color to LCH color. | |
Converts an HSL color value to LUV color space. | |
Converts an HSL color value to an RGB color value. | |
Converts an HSL color value to an SRGB color value. | |
Converts an HSL color to XYZ color space. | |
Converts an HSLuv color to CMYK color. | |
Converts an HSLuv color to an HSL color. | |
Converts an HSLuv color to an HSV color. | |
Converts an HSLuv color to LAB color. | |
Converts an HSLuv color to LCH color. | |
Converts an HSLuv color to LUV color. | |
Converts an HSLuv color value to an RGB color value. | |
Converts an HSLuv color value to an sRGB color value. | |
Converts an HSLuv color to XYZ color space. | |
Converts an HSV color to CMYK color. | |
Converts an HSV color value to HSL. | |
Converts an HSV color value to an HSLuv color value. | |
Converts an HSV color value to a LAB color value. | |
Converts an HSV color value to an LCH color value. | |
Converts an HSV color value to an LUV color value. | |
Converts an HSV color value to an RGB color value. | |
Converts an HSV color value to an SRGB color value. | |
Converts an HSV color to XYZ color space. | |
Converts a color from LAB color space to CMYK color space. | |
Converts a color from LAB color space to HSL color space. | |
Converts a LAB color to HSLuv color. | |
Converts a color from LAB color space to HSV color space. | |
Converts a LAB color to LCH color. | |
Converts a color from LAB color space to LUV color space. | |
Converts a color from LAB color space to RGB color space. | |
Converts a color from LAB color space to SRGB color space. | |
Converts a color from LAB color space to XYZ color space. | |
Converts an LCH color to CMYK color. | |
Converts a color in LCH color space to HSL color space. | |
Converts a color in the LCH color space to the HSLuv color space. | |
Converts a color in the LCH color space to the HSV color space. | |
Converts a color in LCH color space to LAB color space. | |
Converts a color from LCH (Lightness, Chroma, Hue) to LUV (Lightness, U, V) color space. | |
Converts an LCH color value to an RGB color value. | |
Converts an LCH color value to an sRGB color value. | |
Converts a color in the LCH color space to the XYZ color space. | |
Converts an LUV color to CMYK color. | |
Converts a color from LUV color space to HSL color space. | |
Converts a color from LUV color space to HSLuv color space. | |
Converts a color from LUV color space to HSV color space. | |
Converts a color in LUV color space to LAB color space. | |
Converts a color in LUV color space to LCH color space. | |
Converts a color from LUV color space to RGB color space. | |
Converts a color from LUV color space to SRGB color space. | |
Converts a color in LUV color space to XYZ color space. | |
number numbers can sometime introduce tiny errors even for simple operations. | |
Converts an RGB color to CMYK color representation. | |
Converts an RGB color to HSL color. | |
Converts an RGB color to HSLuv color. | |
Converts an RGB color value to its corresponding HSV representation. | |
Converts an RGB color to the LAB color space. | |
Converts an RGB color to LCH color. | |
Converts an RGB color to LUV color space. | |
Converts an RGB color to an sRGB color. | |
Converts an RGB color to XYZ color space. | |
Converts an SRGB color to CMYK color. | |
Converts an SRGB color value to HSL color space. | |
Converts an sRGB color value to an HSLuv color value. | |
Converts an sRGB color to HSV color space. | |
Converts an SRGB color to LAB color space. | |
Converts an sRGB color to LCH color. | |
Converts an sRGB color to LUV color space. | |
Converts an SRGB color to an RGB color. | |
Converts an sRGB color to XYZ color space. | |
Converts an XYZ color to CMYK color. | |
Converts XYZ color space to HSL color space. | |
Converts XYZ color space to HSLuv color space. | |
Converts XYZ color space to HSV color space. | |
Converts XYZ color space to LAB color space. | |
Converts XYZ color space to LCH color space. | |
Converts XYZ color space to LUV color space. | |
Converts XYZ color space to RGB color space. | |
Converts XYZ color space to SRGB color space. |
Variables
Variable |
Description |
---|---|
Constant value employed to see if two | |
Constant value for the white reference. |