Not really sure what you would change but you could do.
<iframe id="theframe" src="something.pdf" style="background-color: #FFF;" />
this would do it. or if you were to do it using css.
<iframe id="theframe" src="somthing.pdf"/>
CSS:
#theframe{
background-color: blue;
}
i am a little confused on what you wanted. did you want this to change while the user is on it or like change when you get tired of it?
EDIT: the color would only show up if the src does not load. otherwise it would have something in it.
EDIT: ok to do this with a button it would be (i am using the example above for reference) i will add a button(just one) and the script. Hope this helps.
<script>
function change(){
if(document.getElementById("thebutton").innerHTML == "light"){
document.getElementById("thebutton").innerHTML = "dark";
document.getElementById("theframe").contentWindow.document.body.style.backgroundColor = "white";
}
else{
document.getElementById("thebutton").innerHTML = "light";
document.getElementById("theframe").contentWindow.document.body.style.backgroundColor = "black";
}
}
</script>
<button id="thebutton" type="button" onclick="change();">Dark</button>
<iframe id="theframe" src="" />
if you want to do this on two buttons just put code where it changes the frame into the button instead like.
<button id="thebutton" type="button" onclick="document.getElementById("theframe").contentWindow.document.body.style.backgroundColor = "black";">Dark</button>
<button id="thebutton" type="button" onclick="document.getElementById("theframe").contentWindow.document.body.style.backgroundColor = "white";">Light</button>
<iframe id="theframe" src="" />
hope this helps. if it answers the question put a check so other people can find it.