('/setcolor', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json'
            },
            body: JSON.stringify({ 
                rgb: hexToRgb(colorCode), // Convert color code to RGB
                brightness: brightnessValue,
                warm: warmLightValue
            })
        })
        .then(response => {
            if (!response.ok) {
                throw new Error('Failed to set color');
            }
            return response.json()