Private
_rgbPrivate
convertPrivate
roundPrivate
roundPrivate
Static
PRECISIONCalculates the relative luminance of the color.
The relative luminance value between 0 and 1.
Determines the WCAG compliance level for the contrast between this color and another color.
An object containing the compliance level and the contrast ratio.
Optional
threshold: numberOptional
includeAlpha: booleanOptional
includeAlpha: booleanStatic
set
The Color class represents a color with various color space representations and manipulation methods.
The class supports multiple color spaces, including RGB, HSL, HSV, CMYK, LAB, LCH, XYZ, and YUV. It also provides methods for converting between color spaces and generating harmony colors.
The class offers various color manipulation methods, such as adjusting lightness, saturation, hue, and alpha. It also provides methods for converting colors to different string representations and retrieving information about the color.
The class also includes utility methods for determining the perceived brightness of the color and checking if it is light or dark.