library/src/Color.hpp

48 lines
1.0 KiB
C++
Raw Normal View History

#ifndef LIBRARY_COLOR_HPP
#define LIBRARY_COLOR_HPP
namespace vkvm {
/**
* color values represented as rgb values.
* @author Johannes Theiner
* @since 0.1.0
*/
class Color {
private:
unsigned char red;
unsigned char green;
unsigned char blue;
public:
Color(unsigned char red, unsigned char green, unsigned char blue) noexcept;
auto getRed() -> unsigned char;
auto getGreen() -> unsigned char;
auto getBlue() -> unsigned char;
auto setRed(unsigned char value) -> void;
auto setGreen(unsigned char value) -> void;
auto setBlue(unsigned char value) -> void;
2019-11-21 11:35:54 +01:00
bool operator==(const Color &other) const ;
bool operator!=(const Color &other) const ;
};
const static Color black = Color(0, 0, 0);
const static Color white = Color(255, 255, 255);
2019-11-21 11:35:54 +01:00
const static Color green = Color(0, 255, 0);
const static Color red = Color(255, 0, 0);
const static Color blue = Color(0, 0, 255);
}
#endif