Describe the bug
Invalid rgba percentage strings are getting passed as valid
Examples
rgb(5%,5%,5%) helloWorld!
I would expect isRgbColor to return false here, due to the additional string content, after the valid rgb color value, however it currently will return true
The bug is caused by a missing $ at the end of the RegExp:
const rgbColorPercent = /^rgb((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%))/;
const rgbaColorPercent = /^rgba((([0-9]%|[1-9][0-9]%|100%),){3}(0?.\d|1(.0)?|0(.0)?))/;
PR that fixes this will be created in a few moments