[git fast commit] 24. Jun 2018 - 16:46:37

This commit is contained in:
Sheppy
2018-06-24 16:46:37 +02:00
parent 4f9092743d
commit 8bf4285c32
5 changed files with 33 additions and 5 deletions

View File

@@ -45,7 +45,7 @@ def color_panel(s,hex_code,seper=True):
sep = ""
return "^fg(#" + hex_code + ") " + s + "^bg()"+sep
def get_color(nr,start,end):
def get_color(nr,start,end,reverse=False):
if end == start or nr >= end:
return hex(GREEN)
elif nr <= 0 or nr < start:
@@ -75,8 +75,14 @@ def get_color(nr,start,end):
else:
error("Negative interval value???")
return(WHITE)
r = r << 16
g = g << 8
if not reverse:
r = r << 16
g = g << 8
else:
r = r << 8
g = g << 16
tmp_col = r + g + b
if tmp_col > 0xFFFF00:
error("color value too high")