Closed Cherry closed 4 years ago
Taking a brief look at the code, I think it should be as simple as adding an end-of-string $
character to the end of the regex at https://github.com/dreamyguy/validate-color/blob/c84d8a010cd07365103be6e157056c250ef42819/src/validate-color/index.js#L167
Firstly, thanks for this module. I was about to write my own colour validation for https://placeholders.dev before stumbling across this. 👍
However, it seems that there are some false positives with RGB, etc. values:
This can also be replicated for
rgb
,hsl
andhsla
values.