mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-24 23:09:16 +01:00
Merge pull request #529 from sholland1/decimal
Add decimal output support
This commit is contained in:
commit
7fae8d23f5
@ -48,6 +48,16 @@ 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 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
|
@property
|
||||||
def octal(self):
|
def octal(self):
|
||||||
"""Export color in octal."""
|
"""Export color in octal."""
|
||||||
|
Loading…
Reference in New Issue
Block a user