AbstractStaticparseParses a color string in hex or rgb(a) format and returns RGB values.
Color string in hex (#fff, #ffffff) or rgb/rgba format
RGB object with r, g, b properties, or null if parsing fails
StaticparseParses a colour as browsers serialise a computed one: rgb() or rgba(),
with commas or spaces, keeping its alpha. A computed colour that stays in
another space -- oklch(), lab(), color(srgb ...) -- is not read.
The colour, as getComputedStyle gives it
The colour with its alpha from 0 to 1, or null if parsing fails
StaticinvertStaticgetStaticrgbConverts an RGB object to a CSS rgb() string format.
The RGB color to convert
CSS rgb() string representation
Staticis
Abstract utility class for color parsing, manipulation, and contrast calculations.