mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 14:09:19 +00:00
website module: minor updates
This commit is contained in:
@@ -327,7 +327,7 @@ def get_hex_shade(color, percent):
|
|||||||
r, g, b = color[0:2], color[2:4], color[4:6]
|
r, g, b = color[0:2], color[2:4], color[4:6]
|
||||||
|
|
||||||
# switch dark and light shades
|
# switch dark and light shades
|
||||||
if float(int(r, 16) + int(g, 16) + int(b, 16)) / 3 < 8:
|
if (float(int(r, 16) + int(g, 16) + int(b, 16)) / 3) > 128:
|
||||||
percent = -percent
|
percent = -percent
|
||||||
|
|
||||||
return p(r) + p(g) + p(b)
|
return p(r) + p(g) + p(b)
|
||||||
|
|||||||
Reference in New Issue
Block a user