Slimelite BBS

rgba.lha

Back to lib

RGB / RGBA parsing / formatting library

Size
53K (54,209 bytes)
Added
2026-11-20 02:43
Downloads
2
Long Description
Installation Copy rgba.h and rgba.c to you source code tree. Example void test_named() { short ok; int32_t val = rgba_from_string("olive", &ok); assert(ok); assert(0x808000FF == val); } API typedef struct { double r, g, b, a; } rgba_t; rgba_t rgba_new(uint32_t rgba); uint32_t rgba_from_string(const char *str, short *ok); void rgba_to_string(rgba_t rgba, char *buf, size_t len); void rgba_inspect(uint32_t rgba);