diff --git a/color.php b/color.php
index 0e0fc74..18759de 100644
--- a/color.php
+++ b/color.php
@@ -22,6 +22,11 @@ if(!in_array($mode, ['s', 'y', 'f'])) {
$mode = 's';
}
+$stromstoss = $_GET['stromstoss'];
+if(!$stromstoss==1) {
+ $stromstoss = 0;
+}
+
$red = hexdec(substr($value, 0, 2));
$green = hexdec(substr($value, 2, 2));
$blue = hexdec(substr($value, 4, 2));
@@ -37,6 +42,12 @@ if(is_int($step)) {
echo "\n";
}
+if($stromstoss==0) {
+ $red=$red;
+ $green=$green*200/255;
+ $blue=$blue*128/255;
+}
+
echo $url . '5' . '%20' . $red . '%20' . $mode . "\n";
echo http_response($ch, $url . '5' . '%20' . $red . '%20' . $mode);
echo "\n";
diff --git a/index.html b/index.html
index 433eb07..9ce357d 100644
--- a/index.html
+++ b/index.html
@@ -62,6 +62,8 @@
+
+
@@ -88,7 +90,7 @@
values[data[i]['name']] = data[i]['value'];
};
- $.get('color.php' ,{'value': values['color'], 'mode': values['mode'], 'fadestep': values['fadestep']});
+ $.get('color.php' ,{'value': values['color'], 'mode': values['mode'], 'fadestep': values['fadestep'], 'stromstoss': values['stromstoss']});
};
$('#changeLight').submit(callback);
$('#submit').on('click,enter', callback);