JSFiddle - React, Tailwind, and code Playground
HTML
<i id="bgcolor" style="background-color: rgb(255, 146, 180)">test</i>
JavaScript
$("#bgcolor").mouseleave(function(){
var bodyColor = $(this).attr("style");
$("body").attr("style", bodyColor);
});