I would like to compare against the returned rgb color value using a simple method in jQuery or Javascript. I’ve tried everything I can think of, but can’t get anything to evaluate true.
if( $('.Updated-Alert').css('color') == 'rgb(255,0,0)')
I have found other answers that parse through the RGB, but they really seem like major overkill for what I need it for.
It just returns a string. Your comparison fails because your white space is preventing the equivalence.
http://jsfiddle.net/etLcv/
If you want to harden it a little bit, you could trim whitespace and compare to that:
Or even trim out anything but the digits: