mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-02-15 17:59:48 +01:00
export: Added octal support. Closes #193
This commit is contained in:
parent
39e5ab295b
commit
dafaa06389
@ -32,6 +32,16 @@ class Color:
|
|||||||
"""Add URxvt alpha value to color."""
|
"""Add URxvt alpha value to color."""
|
||||||
return "[%s]%s" % (self.alpha_num, self.hex_color)
|
return "[%s]%s" % (self.alpha_num, self.hex_color)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def octal(self):
|
||||||
|
"""Export color in octal"""
|
||||||
|
return "%s%s" % ("#", oct(int(self.hex_color[1:], 16))[2:])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def octal_strip(self):
|
||||||
|
"""Strip '#' from octal color."""
|
||||||
|
return oct(int(self.hex_color[1:], 16))[2:]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def strip(self):
|
def strip(self):
|
||||||
"""Strip '#' from color."""
|
"""Strip '#' from color."""
|
||||||
|
Loading…
Reference in New Issue
Block a user