Parses the given css color-value and returns it as RGBAColor (r/g/b in
range [0..255] a in range [0..1]).
Color values are parsed using a fast-path for hex- and rgb-colors and a
hidden dom-element and getComputedStyle() to get the rgb-values for any
other valid css color-value including css custom-properties. Since computing
the color-values this way can be expensive, the values for those more complex
formats are cached.
Parses the given css color-value and returns it as
RGBAColor
(r/g/b in range [0..255] a in range [0..1]).Color values are parsed using a fast-path for hex- and rgb-colors and a hidden dom-element and
getComputedStyle()
to get the rgb-values for any other valid css color-value including css custom-properties. Since computing the color-values this way can be expensive, the values for those more complex formats are cached.