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

Errors while using HSL #5

Closed
emberian opened this issue Nov 27, 2011 · 2 comments
Closed

Errors while using HSL #5

emberian opened this issue Nov 27, 2011 · 2 comments
Labels

Comments

@emberian
Copy link

While typing "hsl(23, 128, 120)", I get error when I start typing the '120':

Error detected while processing function 55_PreviewCSSColorInLine..55_MatchColorValue:
line 10:
E254: Cannot allocate color #ffc61723e1a3e3adde7

and it doesn't highlight the color. Using HEAD from the repo.

@ap ap closed this as completed in aaf133d Nov 27, 2011
@ap
Copy link
Owner

ap commented Nov 27, 2011

Btw, the problem is that your syntax is wrong. The saturation and lightness values values must be percentages or fractions between 0 and 1. Your plain 128 and 120 mean 12800% and 12000% respectively, and the script did not check for this, so it produced ridiculously huge values for the R, G and B of the highlight colour. I changed now it so it will not highlight such extremely overexposed colour definitions.

@emberian
Copy link
Author

Yep it was wrong, but it shouldn't have been attempted to be highlighted (which was the error). Thanks for the quick fix, and thanks for this wonderful patch of a wonderful plugin.

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

2 participants