From 139a46c56af04a0b8c2f06769ac77078f5581395 Mon Sep 17 00:00:00 2001 From: rodri Date: Sun, 11 Aug 2024 21:40:53 +0000 Subject: fix FPINVAL error. knob for fb clear color. general improvements. --- color.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'color.c') 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); +} -- cgit v1.2.3