Brenta Engine 1.2
Loading...
Searching...
No Matches
color.hpp
1// SPDX-License-Identifier: MIT
2// Author: Giovanni Santini
3// Mail: giovanni.santini@proton.me
4// Github: @San7o
5
6#pragma once
7
8namespace brenta
9{
10
11class Color
12{
13public:
14
15 float r, g, b, a;
16
17 Color() = default;
18 Color(float r, float g, float b, float a = 1.0f)
19 : r(r), g(g), b(b), a(a) {}
20
21 static const inline Color red()
22 { return Color(1.0f, 0.0f, 0.0f, 1.0f); }
23 static const inline Color green()
24 { return Color(0.0f, 1.0f, 0.0f, 1.0f); }
25 static const inline Color blue()
26 { return Color(0.0f, 0.0f, 1.0f, 1.0f); }
27 static const inline Color grey()
28 { return Color(0.2f, 0.2f, 0.207f, 1.0f); }
29 static const inline Color yellow()
30 { return Color(1.0f, 1.0f, 0.0f, 1.0f); }
31 static const inline Color white()
32 { return Color(1.0f, 1.0f, 1.0f, 1.0f); }
33 static const inline Color black()
34 { return Color(0.0f, 0.0f, 0.0f, 1.0f); }
35
36};
37
38
39} // namespace brenta