I'm using javascript to allow users to set the background color of a table.
the problem is, when I set the background color, I use hex (#ffffff), but after it is set as background-color, it converts to rgb(255,255,255)
it has to be in hex... what can I do?
the problem is, when I set the background color, I use hex (#ffffff), but after it is set as background-color, it converts to rgb(255,255,255)
Code:
function change_inner_body(color)
{
alert(color)
//this displays #ffffff
document.getElementById('inner_body').style.backgroundColor=color;
alert(document.getElementById('inner_body').style.backgroundColor);
//this displays rgb(255, 255, 255)
}
it has to be in hex... what can I do?