mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-28 19:03:17 +01:00
add support for hex_argb
This commit is contained in:
parent
4997a49eb7
commit
f91237f5ab
@ -38,6 +38,12 @@ class Color:
|
||||
return "rgba(%s,%s,%s,%s)" % (*hex_to_rgb(self.hex_color),
|
||||
self.alpha_dec)
|
||||
|
||||
@property
|
||||
def hex_argb(self):
|
||||
"""Convert an alpha hex color to argb hex."""
|
||||
return "#%02X%s" % (int(int(self.alpha_num) * 255 / 100),
|
||||
self.hex_color[1:])
|
||||
|
||||
@property
|
||||
def alpha(self):
|
||||
"""Add URxvt alpha value to color."""
|
||||
|
Loading…
Reference in New Issue
Block a user