Skip to content
New issue

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

rgba fill with non-round numbers results in black background #645

Closed
mrmianbao opened this issue Jul 14, 2023 · 3 comments · Fixed by linebender/svgtypes#14
Closed

rgba fill with non-round numbers results in black background #645

mrmianbao opened this issue Jul 14, 2023 · 3 comments · Fixed by linebender/svgtypes#14
Labels

Comments

@mrmianbao
Copy link

The following fill just results in a black background

I can round the numbers to fix the issue but seems like a bug as non-round numbers work fine in css.

Example with error vercel satori playgound

Example without error vercel satori playgound

@yisibl
Copy link
Contributor

yisibl commented Jul 14, 2023

https://drafts.csswg.org/css-color-4/#ex-hwb-serial

contrary to CSS Color 3, the parameters of the rgb() function are of type <number>, not <integer>. Thus, any higher precision than eight bits is indicated with a fractional part.

I'll try to fix this.

@RazrFalcon
Copy link
Collaborator

Yes, resvg doesn't support CSS 4 Color draft.

@RazrFalcon
Copy link
Collaborator

Fixed in 0.36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants