common_util 1.1.0
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1
19#pragma once
20
21#include <cstdint>
22
23namespace cutl
24{
25
31{
32public:
38
44 color_argb(uint32_t value);
45
53 color_argb(uint8_t r, uint8_t g, uint8_t b);
62 color_argb(uint8_t a, uint8_t r, uint8_t g, uint8_t b);
63
68 virtual ~color_argb();
69
70public:
76 uint32_t value() const;
77
83 uint8_t a() const;
89 uint8_t r() const;
95 uint8_t g() const;
101 uint8_t b() const;
107 void set_value(uint32_t uValue);
115 bool operator==(const color_argb& color);
123 bool operator!=(const color_argb& color);
124
125public:
206
207private:
208 uint32_t m_uValue;
209};
210
211} // namespace cutl
argb clolor space
Definition color.h:31
static color_argb silver
Const color_argb object, silver color.
Definition color.h:195
static color_argb purple
Const color_argb object, orange color.
Definition color.h:185
bool operator!=(const color_argb &color)
Is not equal to another color_argb object.
static color_argb navy
Const color_argb object, navy color.
Definition color.h:175
static color_argb maroon
Const color_argb object, maroon color.
Definition color.h:170
uint32_t value() const
Get the value of argb color.
static color_argb red
Const color_argb object, red color.
Definition color.h:190
static color_argb gray
Const color_argb object, gray color.
Definition color.h:155
static color_argb olive
Const color_argb object, olive color.
Definition color.h:180
uint8_t b() const
Get blue value.
static color_argb green
Const color_argb object, green color.
Definition color.h:160
bool operator==(const color_argb &color)
Is equal to another color_argb object.
static color_argb teal
Const color_argb object, teal color.
Definition color.h:200
void set_value(uint32_t uValue)
Set the value object.
static color_argb white
Const color_argb object, white color.
Definition color.h:130
static color_argb yellow
Const color_argb object, yellow color.
Definition color.h:205
static color_argb blue
Const color_argb object, blue color.
Definition color.h:145
uint8_t r() const
Get red value.
virtual ~color_argb()
Destroy the color argb object.
color_argb(uint8_t r, uint8_t g, uint8_t b)
Construct a new color argb object.
uint8_t g() const
Get green value.
color_argb(uint8_t a, uint8_t r, uint8_t g, uint8_t b)
Construct a new color argb object.
static color_argb aqua
Const color_argb object, aqua color.
Definition color.h:140
static color_argb lime
Const color_argb object, lime color.
Definition color.h:165
static color_argb fuschia
Const color_argb object, fuchsia color.
Definition color.h:150
uint8_t a() const
Get alpha value.
static color_argb black
Const color_argb object, black color.
Definition color.h:135
color_argb()
Construct a new color argb object, default color is black.
color_argb(uint32_t value)
Construct a new color argb object.