| 16 | namespace app { |
| 17 | |
| 18 | Shade shade_from_string(const std::string& str) |
| 19 | { |
| 20 | Shade shade; |
| 21 | std::vector<std::string> parts; |
| 22 | base::split_string(str, parts, " "); |
| 23 | for (const auto& part : parts) { |
| 24 | auto color = app::Color::fromString(part); |
| 25 | if (color.getType() == app::Color::IndexType) |
| 26 | shade.push_back(color); |
| 27 | } |
| 28 | return shade; |
| 29 | } |
| 30 | |
| 31 | std::string shade_to_string(const Shade& shade) |
| 32 | { |
no test coverage detected