summaryrefslogtreecommitdiff
path: root/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'color.c')
-rw-r--r--color.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/color.c b/color.c
index 6ba23e3..f38e66d 100644
--- a/color.c
+++ b/color.c
@@ -140,3 +140,10 @@ linear2srgb(Color c)
c.b = _linear2srgb(c.b);
return c;
}
+
+ulong
+rgba2xrgb(ulong c)
+{
+ return (c & 0xFF)<<24|(c>>8 & 0xFF)<<16|
+ (c>>16 & 0xFF)<<8|(c>>24 & 0xFF);
+}