aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/color/rgb.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/utils/color/rgb.hpp (renamed from src/utils/rgb_color.hpp)24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/utils/rgb_color.hpp b/src/utils/color/rgb.hpp
index 36a5b42c..6871e452 100644
--- a/src/utils/rgb_color.hpp
+++ b/src/utils/color/rgb.hpp
@@ -26,33 +26,41 @@
#define RGB_COLOR_HPP
#include <GL/gl.h>
+#include <stdint.h>
namespace usdx
{
+ class HsvColor;
+
class RgbColor
{
private:
- float red;
- float green;
- float blue;
+ uint8_t red;
+ uint8_t green;
+ uint8_t blue;
protected:
mutable GLubyte *array;
mutable size_t array_length;
public:
- RgbColor(int red, int green, int blue);
- RgbColor(float red, float green, float blue);
+ RgbColor(uint8_t red, uint8_t green, uint8_t blue);
+ RgbColor(const uint32_t color);
RgbColor(const RgbColor& color);
+ RgbColor(const HsvColor& hsv);
virtual ~RgbColor();
RgbColor& operator=(const RgbColor& color);
- float get_red(void) const;
- float get_green(void) const;
- float get_blue(void) const;
+ uint8_t get_red(void) const;
+ uint8_t get_green(void) const;
+ uint8_t get_blue(void) const;
virtual const GLubyte* get_array(size_t len) const;
int get_array_comonent_count(void) const;
+
+ bool is_grey(void) const;
+ bool is_black(void) const;
+ bool is_white(void) const;
};
};