Skip to content

Commit ab83015

Browse files
chrishoageeylles
authored andcommitted
add support for hex_argb
1 parent 361ffd4 commit ab83015

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pywal/util.py

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ def rgba(self):
3838
return "rgba(%s,%s,%s,%s)" % (*hex_to_rgb(self.hex_color),
3939
self.alpha_dec)
4040

41+
@property
42+
def hex_argb(self):
43+
"""Convert an alpha hex color to argb hex."""
44+
return "#%02X%s" % (int(int(self.alpha_num) * 255 / 100),
45+
self.hex_color[1:])
46+
4147
@property
4248
def alpha(self):
4349
"""Add URxvt alpha value to color."""

0 commit comments

Comments
 (0)