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

Color format globbing #1

Open
kayex opened this issue Jan 7, 2018 · 0 comments
Open

Color format globbing #1

kayex opened this issue Jan 7, 2018 · 0 comments
Labels

Comments

@kayex
Copy link
Owner

kayex commented Jan 7, 2018

We should remain accommodating to color strings with foreign characters that have been included by accident, which is especially common when copying colors from a CSS stylesheet or other source code.

This color string should parse, despite having both a colon and space prefixed and a semicolon suffixed: ": #fff;".

In addition to this, we should be flexible in the format requirements of the respective color types, for example, we should support both the full and shorthand hexadecimal color format (i.e. both #ffffff and #fff)

Valid hex color formats

#fff
fff
ffffff

Valid RGB color formats

rgb(255,255,255)
rgba(255, 255, 255, 1.0)
rgba(255,255,255,1.0)
rgba(255,255,255,1)
(255, 255, 255)
(255,255,255)
255, 255, 255
255,255,255
255 255 255
@kayex kayex added the feature label Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant