bgrins / TinyColor

Fast, small color manipulation and conversion for JavaScript
https://bgrins.github.io/TinyColor/
MIT License
5.05k stars 437 forks source link

#161 - Modify isValid() to discriminate against improper formats used for colors #166

Open nyteksf opened 6 years ago

nyteksf commented 6 years ago

Hey.

Like so many others have said already--thanks for providing this awesome library!

This is being posted in regard to issue #161. The patch applied discriminates against color inputs that either use extra commas, or otherwise choose numbers from outside the valid range (eg, 0-360, 0-100%, 0-100%, 0-1).

That said, with your help and any recommendations upon review, I was hoping to submit this particular pull request so that the issue above can be addressed.

Thanks for your time.