Short:        RGB / RGBA parsing / formatting library
Author:       TJ Holowaychuk
Uploader:     Carsten Larsen (carsten larsen mail com)
Type:         dev/lib
Version:      0.1.0
Architecture: generic; m68k-amigaos
URL:          https://github.com/clibs/rgba.git

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);