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
Notes: sideshowbarker 2024-07-19 14:44:37 +09:00

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;