Commit 572bdde3 authored by phob1an's avatar phob1an 🎧
Browse files

just that bit prettier

parent 65936542
......@@ -161,21 +161,21 @@ tmp_img_path = os.path.expanduser('~/.cullax.png')
tmp_img.save(tmp_img_path)
image_average = colorgram.extract(tmp_img_path, 1)
av_h, av_s, av_l = image_average[0].hsl
print("Image average\t", av_h, av_s/255, av_l/255)
print("Image average\t", av_h, av_s/256, av_l/256)
#sys.exit()
colors = colorgram.extract(tmp_img_path, 6)
sat = 0
#print(colors.hsl)
for i in colors:
#for i in colors:
#r,g,b = (i.rgb)
#print(rgb_to_hex(i.rgb))
print(i.rgb)
#print(i.rgb)
#sys.exit(0)
hb,sb,lb = [ c/255.0 for c in colors[0].hsl ]
primary_h, primary_s, primary_l = [ c/256.0 for c in colors[0].hsl ]
colors.sort(key=lambda c: c.hsl.s)
h,s,l = [ c/255.0 for c in colors[len(colors) - 1].hsl ]
......@@ -188,30 +188,25 @@ if s < 0.011:
s = 0.0
h = 0.0
mode = '1'
if mode == '1':
#panel_background = pb
panel_background = color_triplet(hb, av_l/512, av_s/128)
panel_header = color_triplet(hb, 0.12, 0.09)
button_hover = color_triplet(h, 0.2, s)
foreground = "255,255,255"
task_focus = "112,112,112"
button_foreground = "252,252,252"
highlight_color = "255,0,0"
#highlight_color = color_triplet(h, 0.88, 1)
midlight = color_triplet(h, 0.5, 0.5)
elif mode == '2':
panel_background = color_triplet(hb, 0.96, 0.5)
panel_header = color_triplet(hb, 1, 0.83)
task_focus = "255,255,255"
foreground = "72,72,72"
button_foreground = "64,64,64"
button_hover = color_triplet(h, 0.9, s)
highlight_color = color_triplet(h, 0.6, 0.85)
midlight = color_triplet(h, 0.77, 0.6)
else:
sys.exit("Well that didn't go well.")
print("av over 256 ", av_s/256, av_l/256)
new_s = av_s/256
new_l = av_l/256
if new_s < 0.87 and new_l > 0.15:
new_s = new_s + 0.13
panel_background = color_triplet(primary_h, av_l/512, new_s)
panel_header = color_triplet(primary_h, 0.12, 0.09)
button_hover = color_triplet(h, 0.2, s)
foreground = "255,255,255"
task_focus = color_triplet(primary_h, 0.35, new_s/2)
button_foreground = "252,252,252"
highlight_color = color_triplet(primary_h, 0.8, new_s)
#highlight_color = color_triplet(h, 0.88, 1)
midlight = color_triplet(h, 0.5, 0.5)
#print(panel_background)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment