Немного доработал код:
var button = document.getElementById('submit');
var checkboxes = document.getElementsByName('member');
var radios = document.getElementsByName('color');
var choosencolor = document.getElementsByName('choosencolor')[0];
for (var i = 0; i < radios.length; i++) {
radios[i].onchange = function(e){
choosencolor.value = this.parentNode.previousElementSibling.innerHTML;
}
}
button.onclick = confirm;
function confirm(event){
event.preventDefault();
var checkValue;
for (var j = 0; j < radios.length; j++) {
if(radios[j].checked){
checkValue = radios[j].value;
}
}
for (var i = 0; i < checkboxes.length; i++) {
if(checkboxes[i].checked){
checkboxes[i].parentNode.parentNode.setAttribute('style', 'background:'+ checkValue + ';');
}
}
}