diff options
| -rw-r--r-- | pywal/util.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pywal/util.py b/pywal/util.py index 7a6787e..76a364b 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -36,7 +36,7 @@ class Color: def rgba(self): """Convert a hex color to rgba.""" return "rgba(%s,%s,%s,%s)" % (*hex_to_rgb(self.hex_color), - int(self.alpha_num) / 100) + self.alpha_dec) @property def alpha(self): @@ -44,6 +44,10 @@ class Color: return "[%s]%s" % (self.alpha_num, self.hex_color) @property + def alpha_dec(self): + return int(self.alpha_num) / 100 + + @property def octal(self): """Export color in octal""" return "%s%s" % ("#", oct(int(self.hex_color[1:], 16))[2:]) |
