M
mark_dp73
I need to extract the background color of a div in a format that can be
manipulated mathematically. When I retrieve style.backgroundColor, I
get rgb(255,255,255), even though it was put in as #FFFFFF. Is there a
way to get the hex value out of backgroundColor or pull the individual
color values out of the rgb()? I would prefer not parsing out the rgb()
string (mainly because I think that's just a sloppy way of doing it).
manipulated mathematically. When I retrieve style.backgroundColor, I
get rgb(255,255,255), even though it was put in as #FFFFFF. Is there a
way to get the hex value out of backgroundColor or pull the individual
color values out of the rgb()? I would prefer not parsing out the rgb()
string (mainly because I think that's just a sloppy way of doing it).