Well... yes, but, usually what happens is that the popup window loads a file with its own background color. Nevertheless, this is how you should do it, write all your page with this code:
<input id="color" /> //color should be in hex format
<input type="button" value="create" onclick="pop();" />
<script type="text/javascript">
function pop(){
var c='#'+document.getElementById('color').value;
nw = window.open();
nw.document.write("<style>body{background-color:"+c+"; color: #fff}</style>etc.");}
</script>