Dualie
Loading...
Searching...
No Matches
Color.hpp
1
2//
3// Created by caleb on 6/16/24.
4//
5
6#ifndef DUALIE_COLOR_HPP
7#define DUALIE_COLOR_HPP
8
9#include <citro2d.h>
10#include <cstdint>
11
12namespace dl {
13
14 typedef u32 uint32_t;
15
19 class Color {
20
21 u32 m_color;
22
23 public:
24 Color();
25 Color(std::uint8_t red, std::uint8_t green, std::uint8_t blue, std::uint8_t alpha = 255);
26 explicit Color(std::uint32_t color);
27
33 const u32 & getColorValue() const;
34
35
36 //Important constants
37 static Color Black;
38 static Color White;
39 static Color Red;
40 static Color Green;
41 static Color Blue;
42 static Color Yellow;
43 static Color Magenta;
44 static Color Cyan;
46
47 };
48
49
50}
51
52
53#endif //DUALIE_COLOR_HPP
A class used to describe a RGBA color.
Definition Color.hpp:19
const u32 & getColorValue() const
Color values are stored as a 32 bit integer in the format ABGR, with A being shifted 24 bits,...
Definition Color.cpp:21
static Color Black
Black predefined color.
Definition Color.hpp:37
static Color Magenta
Magenta predefined color.
Definition Color.hpp:43
static Color White
White predefined color.
Definition Color.hpp:38
static Color Red
Red predefined color.
Definition Color.hpp:39
static Color Transparent
Transparent (black) predefined color.
Definition Color.hpp:45
static Color Cyan
Cyan predefined color.
Definition Color.hpp:44
static Color Blue
Blue predefined color.
Definition Color.hpp:41
static Color Green
Green predefined color.
Definition Color.hpp:40
static Color Yellow
Yellow predefined color.
Definition Color.hpp:42