summary refs log tree commit diff
path: root/xutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'xutil.c')
-rw-r--r--xutil.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xutil.c b/xutil.c
index 9c80dfe..6e80379 100644
--- a/xutil.c
+++ b/xutil.c
@@ -430,3 +430,12 @@ xu_getcolor(struct screen_ctx *sc, char *name)
 
 	return (color.pixel);
 }
+
+void
+xu_xorcolor(XRenderColor a, XRenderColor b, XRenderColor *r)
+{
+	r->red = a.red ^ b.red;
+	r->green = a.green ^ b.green;
+	r->blue = a.blue ^ b.blue;
+	r->alpha = 0xffff;
+}