From b320766827eb011cedf9b754ab12fcb5f94f007c Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Thu, 10 Mar 2022 12:37:59 +0000 Subject: [PATCH] fhemweb_colorpicker.js: added preset display for HUE mode git-svn-id: https://svn.fhem.de/fhem/trunk@25806 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/fhemweb_colorpicker.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fhem/www/pgm2/fhemweb_colorpicker.js b/fhem/www/pgm2/fhemweb_colorpicker.js index d7c57abab..b488f9804 100644 --- a/fhem/www/pgm2/fhemweb_colorpicker.js +++ b/fhem/www/pgm2/fhemweb_colorpicker.js @@ -36,7 +36,12 @@ FW_colorpickerCreate(elName, devName, vArr, currVal, set, params, cmd) else if( mode == 'BRI' ) { color = parseInt(255 * color / vArr[4]); color = colorpicker_rgb2hex(color,color,color); - } + } else if( mode == 'HUE' ) { + var h = 255 * params[0] / vArr[4]; + var s = 1; + var v = 1; + var color = colorpicker_hsv2rgb(h,s,v); + } var newEl = $('
').get(0); $(newEl).click(function(arg) { cmd(params[0]) });