Color
A color that can be converted to other representations.
The conversion functions can return the object they're called on if it is already in the correct format.
Note that there is not a direct conversion between every pair of representations. In those cases, the values may be converted through one or more intermediate representations.
All colors have an alpha value, which is the opacity of the color as a fraction between 0 and
The alpha will be 1 if the value is unspecified or the color model doesn't support transparency.
Inheritors
Properties
Functions
Calculate the difference ΔEab between this color and other using the CIE 2000 recommendation.
Calculate the difference ΔEab between this color and other using the CIE 1976 recommendation.
Calculate the difference ΔEz between this color and other using the JzAzBz color space.
Return the first color with a contrast ratio exceeding the targetContrast against this color. If no color meets the target, black or white will be returned, whichever has the most contrast.
Return the first color with a contrast ratio greater or equal to the targetContrast against this color, or null
if no color meets the target.
Render this color in CSS functional notation.
Render this color in CSS functional notation if this color space is defined in the CSS standard, or return null if this color is in another color space.
Return true
if all channels of this color, when converted to sRGB, lie in the range [0, 1]
Return the color with the highest contrast ratio against this color.
Create a FloatArray containing all components of this color, with the alpha as the last component
Calculate the contrast ration of this color with other according to the Web Content Accessibility Guidelines
Calculate the relative luminance of this color according to the Web Content Accessibility Guidelines