summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-08-13 18:56:35 +0000
committerrodri <rgl@antares-labs.eu>2024-08-13 18:56:35 +0000
commitd0a7561dd20847504b2449e17fd791f6c2800c84 (patch)
treedddfd672977729b2f73c36b526c1301f258049a6
parent2715ad65bd01c1108d53c44b677847af9f4ce42e (diff)
downloadlibgraphics-d0a7561dd20847504b2449e17fd791f6c2800c84.tar.gz
libgraphics-d0a7561dd20847504b2449e17fd791f6c2800c84.tar.bz2
libgraphics-d0a7561dd20847504b2449e17fd791f6c2800c84.zip
color: rgba2xrgb ≠ swabl.
-rw-r--r--color.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/color.c b/color.c
index f38e66d..13cbef7 100644
--- a/color.c
+++ b/color.c
@@ -144,6 +144,6 @@ linear2srgb(Color c)
ulong
rgba2xrgb(ulong c)
{
- return (c & 0xFF)<<24|(c>>8 & 0xFF)<<16|
- (c>>16 & 0xFF)<<8|(c>>24 & 0xFF);
+ return (c & 0xFF)<<24|(c>>24 & 0xFF)<<16|
+ (c>>16 & 0xFF)<<8|(c>>8 & 0xFF);
}