1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:07:45 +00:00

Color: Add inverted().

Patch contributed by "pd"
This commit is contained in:
Andreas Kling 2019-06-11 07:28:59 +02:00
parent 6ef45bc0ef
commit 58a2b9336a

View file

@ -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()); 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; } RGBA32 value() const { return m_value; }
String to_string() const; String to_string() const;