First of all, you need to set the property correctly
$('#test').animate({ 'background-color': 'rgba(0, 0, 0, 0.7)' },1000);
then you need to enable jquery-ui to animate the colors.
http://jsfiddle.net/7twXW/11/
You can also use css transitions to animate background colors
#test { background-color: rgba(0, 0, 0, 0); -webkit-transition:background-color 1s; -moz-transition:background-color 1s; transition:background-color 1s; }
http://jsfiddle.net/7twXW/13/
Musa
source share