mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
Color: Add a simple lightened() helper.
This commit is contained in:
parent
476c43ab22
commit
a1015840ff
Notes:
sideshowbarker
2024-07-19 14:44:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a1015840ff5
@ -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…
Reference in New Issue
Block a user