about summary refs log tree commit diff
path: root/saneterm/color.py
diff options
context:
space:
mode:
Diffstat (limited to 'saneterm/color.py')
-rw-r--r--saneterm/color.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/saneterm/color.py b/saneterm/color.py
index a7cd1a8..06e1ade 100644
--- a/saneterm/color.py
+++ b/saneterm/color.py
@@ -114,6 +114,13 @@ class Color(object):
         self.type = t
         self.data = data
 
+    # TODO: can we prevent mutation of this object?
+    def __hash__(self):
+        return hash((self.type, self.data))
+
+    def __eq__(self, other):
+        return self.type == other.type and self.data == other.data
+
     def to_gdk(self):
         """
         Convert a Color into a Gdk.RGBA which TextTag accepts.