mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-12-01 04:13:43 +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]."""
|
"""Export the alpha value as a decimal number in [0, 1]."""
|
||||||
return int(self.alpha_num) / 100
|
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
|
@property
|
||||||
def decimal(self):
|
def decimal(self):
|
||||||
"""Export color in decimal."""
|
"""Export color in decimal."""
|
||||||
|
Loading…
Reference in New Issue
Block a user