in my css file I have gradient rule, like this:
background-image:linear-gradient(to right, #FF0000 0%, #00FF00 20px, rgb(0, 0, 255) 100%);
Thanks for sharing some great time saving code. I noticed an error on the following line, which doesn't allow decimal opacity:
rDigits4 = /(\s*(?:[0-9]{1,3}\s*,\s*){3}[0-9]{1,3}\s*)/,// "(1, 2, 3, 4)"
I recommend using this instead, which also supports decimal values with more than 3 numbers:
rDigits4 = /(\s*(?:[0-9]{1,3}\s*,\s*){3}(?:[.\d]+)\s*)/,// "(1, 2, 3, .4)"