calculates the colors brightness (0-255) http://www.w3.org/TR/AERT#color-contrast
compares color with specified one and returns the color contrast defined by (WCAG Version 2)
returns the colors original format possible values: rgb, rgba, hsl, hsla, hex6, hex3, name
returns the original input value
retrieve the colors luminance http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
returns an opaque representation of this color
Optionalopacity: numberoptional opacity ranging from 0 (fully transparent) to 1 (fully opaque). default is 1.
returns the color in RGBA format rgb are in range [0-255] a is in range [0-1]
returns the "best" text color (either white or black) for use on a background of this color algorithm always ensures a minimum contrast ratio of 3:1 as per [ISO-9241-3] and [ANSI-HFES-100-1988]
check if color is transparent
returns the most compact representation of the input value
returns the original input value
StaticcompressStaticgetreturns an opaque representation of the specified color
Optionalopacity: numberoptional opacity ranging from 0 (fully transparent) to 1 (fully opaque). default is 1.
Staticgetreturns the "best" text color (either white or black) for use on a background of this color algorithm always ensures a minimum contrast ratio of 3:1 as per [ISO-9241-3] and [ANSI-HFES-100-1988]
StaticisStaticischeck if specified color is transparent
Optionalcolor: string | nullStaticparseOptionalexpression: string | nullStaticrandomreturn a random color with the specified brightness
Optionalsaturation: numbersaturation of the color. default 0.9
Optionallightness: numberlightness of the color. default 0.6
Optionalsteps: numbernumber of steps. default 30 (12 degree each)
Optionalstep: numberindex of a specific step. randomized by default
Staticvalidate
Simple object representing an RGBA color can be initialized from any valid CSS Expression