mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-28 19:03:17 +01:00
add support for alpha_hex
This commit is contained in:
parent
f91237f5ab
commit
10e716ca90
@ -54,6 +54,11 @@ class Color:
|
||||
"""Export the alpha value as a decimal number in [0, 1]."""
|
||||
return int(self.alpha_num) / 100
|
||||
|
||||
@property
|
||||
def alpha_hex(self):
|
||||
"""Export the alpha value as a hexdecimal number in [00, FF]."""
|
||||
return "%02X" % (int(int(self.alpha_num) * 255 / 100))
|
||||
|
||||
@property
|
||||
def decimal(self):
|
||||
"""Export color in decimal."""
|
||||
|
Loading…
Reference in New Issue
Block a user