  var brightnessValue = document.getElementById('color-slider').value;
    
    // Send POST request to /setbrightness
    fetch('/setbrightness', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({ brightness: brightnessValue })
    })
    .then(response => {
        if (!response.ok) {
            throw new Error('Failed to set brightness');
        }
        return response.json();
    })
    .then(data => {
        console