summaryrefslogtreecommitdiff
path: root/pywal/util.py
diff options
context:
space:
mode:
authorPaul Bienkowski <pb@opatut.de>2017-06-29 16:47:13 +0200
committerPaul Bienkowski <pb@opatut.de>2017-06-29 16:47:13 +0200
commit9de88ad3b84d6211df5e8174db5c8b71a3bd3811 (patch)
tree81d57f74322b1084fe8a79512219d07157219d42 /pywal/util.py
parentfce5036554a66c420d985f276e417b5ca86a4b04 (diff)
template: refactor to allow {color1.rgb} notation and remove putty exception
Diffstat (limited to 'pywal/util.py')
-rwxr-xr-xpywal/util.py11
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)