From ae3f7b686e16a8b105a3044e214c6533dfad9f9b Mon Sep 17 00:00:00 2001 From: Nick Dajda Date: Sat, 20 Oct 2018 21:33:13 +0100 Subject: [PATCH] Fixed non HTML5 compliant color code --- bin/user/historygenerator.py | 4 ++-- skins/Bootstrap/skin.conf | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/user/historygenerator.py b/bin/user/historygenerator.py index 87bef63..3c2a8c3 100644 --- a/bin/user/historygenerator.py +++ b/bin/user/historygenerator.py @@ -338,14 +338,14 @@ def _colorCell(self, value, format_string, cellColours): value: Numeric value for the observation format_string: How the numberic value should be represented in the table cell. - cellColours: An array containing 3 lists. [minvalues], [maxvalues], [html colour code] + cellColours: An array containing 4 lists. [minvalues], [maxvalues], [background color], [foreground color] """ if value is not None: cellText = "= int(c[0])) and (value <= int(c[1])): + if (value >= float(c[0])) and (value <= float(c[1])): cellText += " style=\"background-color:%s; color:%s\"" % (c[2], c[3]) formatted_value = format_string % value diff --git a/skins/Bootstrap/skin.conf b/skins/Bootstrap/skin.conf index 174bd51..f7a475b 100644 --- a/skins/Bootstrap/skin.conf +++ b/skins/Bootstrap/skin.conf @@ -362,9 +362,9 @@ # fontColours = foreground colour [optional, defaults to black if omitted] # Default is temperature scale - minvalues = -50, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35 - maxvalues = -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 60 - colours = "#0029E5", "#0186E7", "#02E3EA", "#04EC97", "#05EF3D2", "#2BF207", "#8AF408", "#E9F70A", "#F9A90B", "#FC4D0D", "#FF0F2D" + minvalues = -50, -10, -5, 0, 5, 10, 15, 20, 25, 30, 35 + maxvalues = -10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 60 + colours = "#0029E5", "#0186E7", "#02E3EA", "#04EC97", "#05EF3D", "#2BF207", "#8AF408", "#E9F70A", "#F9A90B", "#FC4D0D", "#FF0F2D" fontColours = "#FFFFFF", "#FFFFFF", "#000000", "#000000", "#000000", "#000000", "#000000", "#000000", "#FFFFFF", "#FFFFFF", "#FFFFFF" monthnames = Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec