diff --git a/libs/gfx/include/psemek/gfx/color.hpp b/libs/gfx/include/psemek/gfx/color.hpp index 8a9d8a4f..9110fab8 100644 --- a/libs/gfx/include/psemek/gfx/color.hpp +++ b/libs/gfx/include/psemek/gfx/color.hpp @@ -52,6 +52,16 @@ namespace psemek::gfx return to_coloru8(c); } + auto as_color_3f() const + { + return color_3f{c[0], c[1], c[2]}; + } + + auto as_color_4f() const + { + return c; + } + operator color_rgb() const { return as_color_rgb(); @@ -64,7 +74,7 @@ namespace psemek::gfx operator color_3f() const { - return color_3f{c[0], c[1], c[2]}; + return as_color_3f(); } operator color_4f() const