var sElement = $('<style id="inline_css" type="text/css"></style>');
$('body').append(sElement);
function updateCSS(color) {
var new_css = ".wrap{ color: " + color + ";}";
sElement.html(new_css);
}
Now you should be abel to call the function "updateCSS()" as needed to update the style element.