struct cogs::Color4b — HIRO 0.7.0 documentation

# struct cogs::Color4b

Holds four color channels in uint8 format in range 0-255.

    #include <Color.h>

    struct Color4b {
        // fields

        uint8_t r = 0;
        uint8_t g = 0;
        uint8_t b = 0;
        uint8_t a = 255;

        // construction

        Color4b();
        Color4b(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
        Color4b(const Color3b& col);
        Color4b(const Color3f& col);
        Color4b(const Color4f& col);
        Color4b(const Color3hex& col);
        Color4b(const Color4hex& col);

        // methods

        Color4b operator+(const Color4b& col) const;
        Color4b& operator+=(const Color4b& col);
        uint8_t* GetPtr();
        const uint8_t* GetPtr() const;
        Color4b Mix(const Color4b& col, float weight) const;
    };