Allow implicit usage of "#ffffffff" etc

This commit is contained in:
2026-09-06 16:13:18 +02:00
parent d43ed70ba3
commit f058dfd0b8
+6
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