avp / spectra

A Javascript color library. Quickly manipulate and convert colors.
avp.github.io/spectra
MIT License
237 stars 18 forks source link

Add leniency to parser #17

Closed avp closed 10 years ago

avp commented 10 years ago

CSS Strings that aren't perfect should be acceptable.

rgb(12, 23 39
rgb(12, 34, 48 0.912 // should have alpha

And any other leniency things you can think about.

This should be able to be done by changing the regexes.

Azeirah commented 10 years ago

I'm not a fan of this, this allows for messy code.

avp commented 10 years ago

Perhaps just acceptance of CSS strings that don't have commas?

Azeirah commented 10 years ago

Do you really believe it's something that would improve spectra's usability? I think it would either not be used, or cause confusion for a very small amount of people.

If it's not broken, don't fix it.

avp commented 10 years ago

I suppose that's true.