<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
.form-input:focus+label, .form-input.active+label{
color: #FF00FF;
}
.form-input+label {
color: #FFFFFF;
}
</style>
<script>
addEventListener("blur", ({target}) => {
if(target.closest && target.closest(".form-input")) target.classList.toggle("active", !!target.value.trim())
}, true)
</script>
</head>
<body>
<input type="text" class="form-input">
<label for="">выбрано</label>
<input type="text" class="form-input">
<label for="">выбрано</label>
<input type="text" class="form-input">
<label for="">выбрано</label>
<input type="text" class="form-input">
<label for="">выбрано</label>
<input type="text" class="form-input">
<label for="">выбрано</label>
</body>
</html>