I wanna know how i can get the opacity param using javascript / jQuery.
For exemple : rgba(255,255,255,0.5)
I need to get 0.5
Thanks
In case if "rgba(255,255,255,0.5)" is string:
var rgba="rgba(255,255,255,0.5)";
var alpha=rgba.replace(/^.*,(.+)\)/,'$1')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With