#pragma once #include #include #include #include "types.hpp" namespace kml { template constexpr uint32_t ToRGBA(Channel red, Channel green, Channel blue, Channel alpha = Channel(255)) { return static_cast(red) << 24 | static_cast(green) << 16 | static_cast(blue) << 8 | static_cast(alpha); } std::optional ParseHexColor(std::string_view c); std::optional ParseGarminColor(std::string_view c); std::optional ParseOSMColor(std::string_view c); PredefinedColor MapPredefinedColor(uint32_t rgba); std::string_view MapGarminColor(uint32_t rgba); } // namespace kml