#ifndef RGBA_BYTES_HPP_
#define RGBA_BYTES_HPP_

#include <Serialize/Plain.hpp>
#include <cstdint>
#include <Serialize/Serialize.hpp>

union RGBABytes
{
    struct
    {
        uint8_t red;
        uint8_t green;
        uint8_t blue;
        uint8_t alpha;
    };

    uint8_t channels[4];
    int asInt;

    glm::vec4 toNormalizedVec() const;
};

PLAIN_SERIALIZABLE(RGBABytes);

#endif