mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-05-31 06:56:13 +02: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),
|
return "rgba(%s,%s,%s,%s)" % (*hex_to_rgb(self.hex_color),
|
||||||
self.alpha_dec)
|
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
|
@property
|
||||||
def alpha(self):
|
def alpha(self):
|
||||||
"""Add URxvt alpha value to color."""
|
"""Add URxvt alpha value to color."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user