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:
parent
476c43ab22
commit
a1015840ff
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue