<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<span id="cena">280</span><span> руб.</span><br>
<input type="text" id="inp" value='0'>
<script>
inp.oninput=function(){
var a = [[120,250,'#0F0'],[48,260,'#590'],[12,270,'#950'],[1,280,'#F00']].find(el => el[0] <= inp.value),
cena = document.querySelector("#cena");
cena.textContent = a[1];
cena.style.color = a[2];
};
</script>
</body>
</html>
Вот простой пример