Using the following jQuery will get the RGB value of an element’s background color:

$('#selector').css('backgroundColor');

Is there a way to get the hex value rather than the RGB?

23 Answers
23

Leave a Reply

Your email address will not be published. Required fields are marked *