We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to MDN [1], there are quite a few more ways to specify colors than are currently covered by the SVG::parseColor method.
SVG::parseColor
The following notations in particular would need to be handled:
#RRGGBBAA
#RGBA
rgb(255, 255, 255, 50%)
rgb(255 255 255)
rgb(255 255 255 / 50%)
rgb(255 255 255 / .5)
hsl
Keep in mind that as per #36, everything mentioned above for rgb also applies to rgba, and everything mentioned for hsl also applies to hsla.
rgb
rgba
hsla
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
The text was updated successfully, but these errors were encountered:
Fixed in 203c93e.
Sorry, something went wrong.
No branches or pull requests
According to MDN [1], there are quite a few more ways to specify colors than are currently covered by the
SVG::parseColor
method.The following notations in particular would need to be handled:
#RRGGBBAA
(hexadecimal notation with alpha component)#RGBA
(short hex notation with alpha component)rgb(255, 255, 255, 50%)
(note the percentage used for alpha)rgb(255 255 255)
(note the missing commas)rgb(255 255 255 / 50%)
andrgb(255 255 255 / .5)
(note the slash)hsl
with different unitshsl
with alpha given as percentageKeep in mind that as per #36, everything mentioned above for
rgb
also applies torgba
, and everything mentioned forhsl
also applies tohsla
.[1] https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
The text was updated successfully, but these errors were encountered: