aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Color.cpp
blob: 9e5f18755b65810eaa8d631b921b4520e3bce0ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "Color.h"

using namespace crepe;

Color Color::white = Color(255, 255, 255, 0);
Color Color::red = Color(255, 0, 0, 0);
Color Color::green = Color(0, 255, 0, 0);
Color Color::blue = Color(0, 0, 255, 0);
Color Color::black = Color(0, 0, 0, 0);
Color Color::cyan = Color(0, 255, 255, 0);
Color Color::yellow = Color(255, 255, 0, 0);
Color Color::magenta = Color(255, 0, 255, 0);

Color::Color(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha) {
	this->a = alpha;
	this->r = red;
	this->g = green;
	this->b = blue;
};

const Color & Color::get_white() { return Color::white; };

const Color & Color::get_red() { return Color::red; };
const Color & Color::get_green() { return Color::green; };
const Color & Color::get_blue() { return Color::blue; };

const Color & Color::get_black() { return Color::black; };

const Color & Color::get_cyan() { return Color::cyan; };

const Color & Color::get_yellow() { return Color::yellow; };

const Color & Color::get_magenta() { return Color::magenta; };