mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-24 23:09:16 +01:00
export: Added rgba support. Closes #352
This commit is contained in:
parent
30af3d0d5c
commit
1e416a18a8
@ -29,6 +29,12 @@ class Color:
|
||||
"""Convert a hex color to xrdb rgba."""
|
||||
return hex_to_xrgba(self.hex_color)
|
||||
|
||||
@property
|
||||
def rgba(self):
|
||||
"""Convert a hex color to rgba."""
|
||||
return "rgba(%s,%s,%s,%s)" % (*hex_to_rgb(self.hex_color),
|
||||
int(self.alpha_num)/100)
|
||||
|
||||
@property
|
||||
def alpha(self):
|
||||
"""Add URxvt alpha value to color."""
|
||||
|
Loading…
Reference in New Issue
Block a user