25 static constexpr
const char* name =
"Color8";
28 static constexpr
const char* name =
"Color16";
31 static constexpr
const char* name =
"Color32";
34 static constexpr
const char* name =
"Color32f";
37 static constexpr
const char* name =
"Color16f";
47 out +=
"r => " + internal::numberToRep(in.r) +
", ";
48 out +=
"g => " + internal::numberToRep(in.g) +
", ";
49 out +=
"b => " + internal::numberToRep(in.b) +
", ";
50 out +=
"a => " + internal::numberToRep(in.a);
55 std::string colorRep(Color<T, false> in) {
56 std::string out(internal::ColorRepTrait<T>::name);
58 out +=
"r => " + internal::numberToRep(in.r) +
", ";
59 out +=
"g => " + internal::numberToRep(in.g) +
", ";
60 out +=
"b => " + internal::numberToRep(in.b);
65 template <
typename T,
bool A>
66 std::ostream& operator<<(std::ostream& out, Color<T, A> in) {
67 return (out << colorRep(in));
72 std::string createColorHexCode(Color<T, true> in) {
73 auto col = color_cast<Color8>(in);
75 std::stringstream str;
76 str << std::hex << std::setfill(
'0');
77 str << std::setw(2) << +col.r;
78 str << std::setw(2) << +col.g;
79 str << std::setw(2) << +col.b;
81 str << std::setw(2) << +col.a;
Definition: ColorCore.hpp:99
This file is part of the Lumina Graphics Framework [L/util].