Allow implicit usage of "#ffffffff" etc

This commit is contained in:
2026-04-03 14:22:51 +02:00
parent 5bc8046ebe
commit af7fc026df

View File

@@ -71,6 +71,12 @@ class PD_API Color {
*/
constexpr Color(const std::string_view& hex) { Hex(hex); }
/**
* Constructor for Hex Input (is abel to run at compile time xD)
* @param hex Hex String in `#ffffff` or `#ffffffff` format
*/
constexpr Color(const char* hex) { Hex(std::string_view{hex}); }
/**
* Create Color Object by Hex String (at compile time btw)
* @param hex Hex String in `#ffffff` or `#ffffffff` format