library/src/Color.hpp

52 lines
1.0 KiB
C++

#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() noexcept;
Color(int red, int green, int blue) noexcept;
explicit Color(unsigned int hex) noexcept;
auto getRed() -> unsigned char;
auto getGreen() -> unsigned char;
auto getBlue() -> unsigned char;
auto setRed(int value) -> void;
auto setGreen(int value) -> void;
auto setBlue(int value) -> void;
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);
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