mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-02-13 08:50:53 +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."""
|
||||
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
|
||||
def strip(self):
|
||||
"""Strip '#' from color."""
|
||||
|
Loading…
Reference in New Issue
Block a user