fix(color_util): Parsing

This commit is contained in:
Michael Carlberg
2017-01-27 13:46:27 +01:00
parent af5f129b76
commit beedc5ab84
5 changed files with 61 additions and 26 deletions

View File

@ -315,14 +315,7 @@ chrono::duration<double> config::convert(string&& value) const {
template <>
rgba config::convert(string&& value) const {
auto color = color_util::parse(value, 0);
// clang-format off
return rgba{
color_util::red_channel<unsigned char>(color) / 255.0,
color_util::green_channel<unsigned char>(color) / 255.0,
color_util::blue_channel<unsigned char>(color) / 255.0,
color_util::alpha_channel<unsigned char>(color) / 255.0};
// clang-format on
return rgba{color_util::parse(value, 0)};
}
template <>