mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-26 07:49:17 +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."""
|
"""Convert a hex color to xrdb rgba."""
|
||||||
return hex_to_xrgba(self.hex_color)
|
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
|
@property
|
||||||
def alpha(self):
|
def alpha(self):
|
||||||
"""Add URxvt alpha value to color."""
|
"""Add URxvt alpha value to color."""
|
||||||
|
Loading…
Reference in New Issue
Block a user