Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2017-07-11 14:11:15 +02:00
parent 447c833fa7
commit ab8627e311
3 changed files with 64 additions and 19 deletions

View File

@@ -1,9 +1,20 @@
import math
import numpy as np
import pandas as pd
import colorsys
lbstoN = 4.44822
def range_to_color_hex(groupcols):
rgb = [colorsys.hsv_to_rgb((207-4*x)/360.,
0.06+0.89*x,
1-0.38*x) for x in groupcols]
RGB = [(int(255.*r),int(255.*g),int(255.*b)) for (r, g, b) in rgb]
colors = ["#%02x%02x%02x" % (r, g, b) for (r, g, b) in RGB]
return colors
def str2bool(v):
return v.lower() in ("yes", "true", "t", "1")