mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-07 08:34:01 +01:00
Add decimal output support
This commit is contained in:
parent
ad9b05ba93
commit
f057c08d1e
@ -48,6 +48,16 @@ class Color:
|
||||
"""Export the alpha value as a decimal number in [0, 1]."""
|
||||
return int(self.alpha_num) / 100
|
||||
|
||||
@property
|
||||
def decimal(self):
|
||||
"""Export color in decimal."""
|
||||
return "%s%s" % ("#", int(self.hex_color[1:], 16))
|
||||
|
||||
@property
|
||||
def decimal_strip(self):
|
||||
"""Strip '#' from decimal color."""
|
||||
return int(self.hex_color[1:], 16)
|
||||
|
||||
@property
|
||||
def octal(self):
|
||||
"""Export color in octal."""
|
||||
|
Loading…
Reference in New Issue
Block a user