diff --git a/Userland/Libraries/LibGfx/Color.h b/Userland/Libraries/LibGfx/Color.h index 5e5ff85ee6..c4a28ba323 100644 --- a/Userland/Libraries/LibGfx/Color.h +++ b/Userland/Libraries/LibGfx/Color.h @@ -159,6 +159,15 @@ public: #endif } + Color multiply(const Color& other) const + { + return Color( + red() * other.red() / 255, + green() * other.green() / 255, + blue() * other.blue() / 255, + alpha() * other.alpha() / 255); + } + Color to_grayscale() const { int gray = (red() + green() + blue()) / 3;