fixed bug

This commit is contained in:
2024-05-07 02:12:16 +03:00
parent 768c8b133a
commit 17fae55fdf
2 changed files with 17 additions and 6 deletions

View File

@@ -17,9 +17,13 @@ namespace uml::color
class Color : public Vector4
{
public:
Color(float r, float g, float, float b, float a = 1.f);
Color(const Vector4& vec);
Color(float r, float g, float b, float a);
static Color FromRGBA(uint8_t r, uint8_t g, uint8_t b, uint8_t a);
explicit Color(const Vector4& vec);
[[nodiscard]] Color Blend(const Color& other, float ratio) const;
explicit operator Vector4() {return {x,y,z,w};}
[[nodiscard]] static Color Red() {return {1.f, 0.f, 0.f, 1.f};}
[[nodiscard]] static Color Green() {return {0.f, 1.f, 0.f, 1.f};}
[[nodiscard]] static Color Blue() {return {0.f, 0.f, 1.f, 1.f};}
};
}