export: Added octal support. Closes
@@ -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."""
