CanvasLib
Loading...
Searching...
No Matches
Color.hpp
1
#ifndef CANVAS_COLOR_HPP
2
#define CANVAS_COLOR_HPP
3
4
#include <RenderAbstraction.hpp>
5
#include <cstdint>
6
#include <limits>
7
8
namespace
canv
9
{
10
14
class
Color
15
{
16
public
:
20
Color
() =
default
;
21
22
/* implicit */
Color
(
const
glm::vec4& glmColor);
// NOLINT
23
27
Color
(uint8_t, uint8_t, uint8_t,
28
uint8_t a = std::numeric_limits<uint8_t>::max()) noexcept;
29
30
/* implicit */
operator glm::vec4() const;
31
32
uint8_t R{ 0 };
33
uint8_t G{ 0 };
34
uint8_t B{ 0 };
35
uint8_t A{ 0 };
36
};
37
38
}
// namespace canv
39
40
#endif
// CANVAS_COLOR_HPP
canv::Color
Utility Color class operating uint8(0..255) values.
Definition
Color.hpp:15
canv::Color::Color
Color()=default
by default creates black transparent color
canv::Color::Color
Color(uint8_t, uint8_t, uint8_t, uint8_t a=std::numeric_limits< uint8_t >::max()) noexcept
creates color using 0.255 values
canv
Definition
CanvasLib.hpp:44
include
CanvasLib
Color.hpp
Generated by
1.10.0