aboutsummaryrefslogtreecommitdiff
path: root/include/mglpp/graphics/Color.hpp
blob: 1cade84c639b4dcf7fe3c02ce3357b61f51d2ca0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef MGLPP_COLOR_HPP
#define MGLPP_COLOR_HPP

#include <stdint.h>

namespace mgl {
    struct Color {
        Color(uint8_t r = 255, uint8_t g = 255, uint8_t b = 255, uint8_t a = 255) : r(r), g(g), b(b), a(a) {

        }

        bool operator == (const Color &other) const {
            return r == other.r
                && g == other.g
                && b == other.b
                && a == other.a;
        }

        bool operator != (const Color &other) const {
            return !(operator==(other));
        }

        uint8_t r, g, b, a;
    };
}

#endif /* MGLPP_COLOR_HPP */