1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

Color: Add a simple lightened() helper.

This commit is contained in:
Andreas Kling 2019-04-12 02:50:43 +02:00
parent 476c43ab22
commit a1015840ff

View file

@ -83,6 +83,11 @@ public:
return Color(red() * 0.8, green() * 0.8, blue() * 0.8, alpha());
}
Color lightened() const
{
return Color(min(255.0, red() * 1.2), min(255.0, green() * 1.2), min(255.0, blue() * 1.2), alpha());
}
RGBA32 value() const { return m_value; }
String to_string() const;