document.body.style.color code example
Example 1: JavaScript Change Background Color
var element = document.body;
element.style.backgroundColor = "blue";
Example 2: javascript change color
var span = document.getElementsByTagName("span")[0];
span.style.color = "red";