OGS
Color.h
Go to the documentation of this file.
1
16#pragma once
17
18#include <array>
19#include <map>
20#include <string>
21
22namespace DataHolderLib
23{
24using Color = std::array<unsigned char, 4>;
25
26Color createColor(unsigned char r,
27 unsigned char g,
28 unsigned char b,
29 unsigned char a = 255);
30
33
36Color getColor(const std::string& id,
37 std::map<std::string, DataHolderLib::Color>& colors);
38
39} // namespace DataHolderLib
std::array< unsigned char, 4 > Color
Definition: Color.h:24
Color getRandomColor()
Returns a random RGB colour.
Definition: Color.cpp:29
Color createColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Definition: Color.cpp:21
Color getColor(const std::string &id, std::map< std::string, Color > &colors)
Definition: Color.cpp:36
static const double r