From af7fc026df27851a6bf189852f8d8f899b257ebd Mon Sep 17 00:00:00 2001 From: tobid7 Date: Fri, 3 Apr 2026 14:22:51 +0200 Subject: [PATCH] Allow implicit usage of "#ffffffff" etc --- include/pd/core/color.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/pd/core/color.hpp b/include/pd/core/color.hpp index 1a2ba76..f9a569e 100755 --- a/include/pd/core/color.hpp +++ b/include/pd/core/color.hpp @@ -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