You’ll need to set the style property of the element.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement.style
With Javacript you’ll need to get a reference to the element whose styles you wish to change. This could be an ID or class.
For example, given the following HTML:
<div id="myDiv"></div>
You could write something like:
// grab the element we want to apply styles to
var el = document.getElementById('myDiv');
// change the background color style property to this rgb value
el.style.backgroundColor = "rgb(0, 0, 0)";
You can alter any css property this way!
Cheers