From 58a2b9336aed30c7e468003e6a633bf2e79ee826 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 11 Jun 2019 07:28:59 +0200 Subject: [PATCH] Color: Add inverted(). Patch contributed by "pd" --- SharedGraphics/Color.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SharedGraphics/Color.h b/SharedGraphics/Color.h index a1e0c819df..d04635999d 100644 --- a/SharedGraphics/Color.h +++ b/SharedGraphics/Color.h @@ -95,6 +95,11 @@ public: return Color(min(255.0, red() * 1.2), min(255.0, green() * 1.2), min(255.0, blue() * 1.2), alpha()); } + Color inverted() const + { + return Color(~red(), ~green(), ~blue()); + } + RGBA32 value() const { return m_value; } String to_string() const;