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

Support space separated rgb values #460

Open
superMDguy opened this issue Nov 1, 2022 · 3 comments
Open

Support space separated rgb values #460

superMDguy opened this issue Nov 1, 2022 · 3 comments

Comments

@superMDguy
Copy link

Example:

color2k.parseToRgba('rgb(255 235 235 / .18)') // (index):139 Uncaught Error: Failed to parse color

This should work with the new CSS Color Module Level 4

@ricokahler
Copy link
Owner

Do you know what the browser support is for that syntax? I'm not familiar with this notation but if browsers support this, this lib should probably too.

@superMDguy
Copy link
Author

It's pretty well supported. I haven't seen it much, but had another library that was outputting colors in that format and needed to convert them to rgba

@jnvoigt
Copy link

jnvoigt commented May 4, 2023

I ran over a similar problem but with hsl

when looking into MDN the comma-separated notation is considered to be legacy
MDN- HSL

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

No branches or pull requests

3 participants