<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
#button{
width: 150px;
border: 1px solid gray;
}
</style>
</head>
<body>
<textarea id='message' placeholder='hello!'></textarea>
<div id='button'>Send</div>
<script>
var col = 1111;
document.querySelector('#message').onkeypress=e=>{
col++;
document.querySelector('#button').style.backgroundColor = '#'+ col .toString(16);
};
</script>
</body>
</html>