1 #include <framework/utilities/ColorPalette.h>
10 const char*
getHex(
const std::string& tangoName,
int tangoId)
12 using ColorTuple = std::array<const char*, 3>;
13 static std::map<std::string, ColorTuple> tango;
15 tango[
"Aluminium"] = ColorTuple({
"#eeeeec",
"#d3d7cf",
"#babdb6"});
16 tango[
"Butter"] = ColorTuple({
"#fce94f",
"#edd400",
"#c4a000"});
17 tango[
"Chameleon"] = ColorTuple({
"#8ae234",
"#73d216",
"#4e9a06"});
18 tango[
"Orange"] = ColorTuple({
"#fcaf3e",
"#f57900",
"#ce5c00"});
19 tango[
"Chocolate"] = ColorTuple({
"#e9b96e",
"#c17d11",
"#8f5902"});
20 tango[
"Sky Blue"] = ColorTuple({
"#729fcf",
"#3465a4",
"#204a87"});
21 tango[
"Plum"] = ColorTuple({
"#ad7fa8",
"#75507b",
"#5c3566"});
22 tango[
"Slate"] = ColorTuple({
"#888a85",
"#555753",
"#2e3436"});
23 tango[
"Scarlet Red"] = ColorTuple({
"#ef2929",
"#cc0000",
"#a40000"});
26 if (tangoId < 1 or tangoId > 3)
27 throw std::runtime_error(
"tangoId must be 1, 2, or 3!");
28 return tango.at(tangoName)[tangoId - 1];
33 return TColor::GetColor(
getHex(tangoName, tangoId));