From 6c3e6077205c5caab20fb41ed2e97d1a8bd2c99c Mon Sep 17 00:00:00 2001 From: Kai Lauterbach Date: Wed, 10 May 2023 13:35:29 +0200 Subject: [PATCH] Fixed slider color gradient --- firmware/data/light_control_template.html | 8 ++++---- firmware/html/light_control_template.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/firmware/data/light_control_template.html b/firmware/data/light_control_template.html index b0ed0db..458f36a 100644 --- a/firmware/data/light_control_template.html +++ b/firmware/data/light_control_template.html @@ -30,16 +30,16 @@ var slider = document.getElementById("bri{{LIGHT_NUMBER_DEC}}"); var pwm = document.getElementById("light{{LIGHT_NUMBER_DEC}}_pwm"); if (lightNumber === 1) { slider.style.background = "linear-gradient(to bottom, " + rgb2Hex(31, 119, 180) + ", white)"; -pwm.style.background = "linear-gradient(to right, " + rgb2Hex(31, 119, 180) + ", white)"; +pwm.style.background = "linear-gradient(to right, white, " + rgb2Hex(31, 119, 180) + ")"; } else if (lightNumber === 2) { slider.style.background = "linear-gradient(to bottom, " + rgb2Hex(255, 127, 14) + ", white)"; -pwm.style.background = "linear-gradient(to right, " + rgb2Hex(255, 127, 14) + ", white)"; +pwm.style.background = "linear-gradient(to right, white, " + rgb2Hex(255, 127, 14) + ")"; } else if (lightNumber === 3) { slider.style.background = "linear-gradient(to bottom, " + rgb2Hex(44, 160, 44) + ", white)"; -pwm.style.background = "linear-gradient(to right, " + rgb2Hex(44, 160, 44) + ", white)"; +pwm.style.background = "linear-gradient(to right, white, " + rgb2Hex(44, 160, 44) + ")"; } else if (lightNumber === 4) { slider.style.background = "linear-gradient(to bottom, " + rgb2Hex(214, 39, 40) + ", white)"; -pwm.style.background = "linear-gradient(to right, " + rgb2Hex(214, 39, 40) + ", white)"; +pwm.style.background = "linear-gradient(to right, white, " + rgb2Hex(214, 39, 40) + ")"; } diff --git a/firmware/html/light_control_template.html b/firmware/html/light_control_template.html index 45c1c32..3a6290c 100644 --- a/firmware/html/light_control_template.html +++ b/firmware/html/light_control_template.html @@ -31,16 +31,16 @@ var pwm = document.getElementById("light{{LIGHT_NUMBER_DEC}}_pwm"); if (lightNumber === 1) { slider.style.background = "linear-gradient(to bottom, " + rgb2Hex(31, 119, 180) + ", white)"; - pwm.style.background = "linear-gradient(to right, " + rgb2Hex(31, 119, 180) + ", white)"; + pwm.style.background = "linear-gradient(to right, white, " + rgb2Hex(31, 119, 180) + ")"; } else if (lightNumber === 2) { slider.style.background = "linear-gradient(to bottom, " + rgb2Hex(255, 127, 14) + ", white)"; - pwm.style.background = "linear-gradient(to right, " + rgb2Hex(255, 127, 14) + ", white)"; + pwm.style.background = "linear-gradient(to right, white, " + rgb2Hex(255, 127, 14) + ")"; } else if (lightNumber === 3) { slider.style.background = "linear-gradient(to bottom, " + rgb2Hex(44, 160, 44) + ", white)"; - pwm.style.background = "linear-gradient(to right, " + rgb2Hex(44, 160, 44) + ", white)"; + pwm.style.background = "linear-gradient(to right, white, " + rgb2Hex(44, 160, 44) + ")"; } else if (lightNumber === 4) { slider.style.background = "linear-gradient(to bottom, " + rgb2Hex(214, 39, 40) + ", white)"; - pwm.style.background = "linear-gradient(to right, " + rgb2Hex(214, 39, 40) + ", white)"; + pwm.style.background = "linear-gradient(to right, white, " + rgb2Hex(214, 39, 40) + ")"; }