diff options
| author | Paul Bienkowski <pb@opatut.de> | 2017-06-29 16:47:13 +0200 |
|---|---|---|
| committer | Paul Bienkowski <pb@opatut.de> | 2017-06-29 16:47:13 +0200 |
| commit | 9de88ad3b84d6211df5e8174db5c8b71a3bd3811 (patch) | |
| tree | 81d57f74322b1084fe8a79512219d07157219d42 /pywal/util.py | |
| parent | fce5036554a66c420d985f276e417b5ca86a4b04 (diff) | |
template: refactor to allow {color1.rgb} notation and remove putty exception
Diffstat (limited to 'pywal/util.py')
| -rwxr-xr-x | pywal/util.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pywal/util.py b/pywal/util.py index 69a9d9d..820be10 100755 --- a/pywal/util.py +++ b/pywal/util.py @@ -51,3 +51,14 @@ def disown(*cmd): stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, preexec_fn=os.setpgrp) + +class Color(object): + def __init__(self, hex): + self.hex = hex + + def __str__(self): + return self.hex + + @property + def rgb(self): + return hex_to_rgb(self.hex) |
