Add decimal output support
@@ -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."""
