et background color of the box if the color code is valid
    if (colorCode.match(/^#[0-9A-Fa-f]{6}$/)) {
        //colorBox.style.backgroundColor = colorCode;
        
        // Send POST request to /setcolor
        fetch('/setcolor', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json'
            },
            body: JSON.stringify({ color: colorCode, brightness: brightnessValue })
        })
        .then(response => {
            if (!response.ok) {
