JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test"></div>

<input id="newColor" type="text" onchange="changeColor(this)"></input>

JavaScript

function changeColor(e) {
	document.getElementById("test").innerHTML += e.value;
}