mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-08-06 21:15:24 +02:00
export: Added rgba support. Closes #352
This commit is contained in:
@ -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."""
|
||||
|
Reference in New Issue
Block a user