Skip to content

Commit

Permalink
Color: Add a simple lightened() helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Apr 12, 2019
1 parent 476c43a commit a101584
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SharedGraphics/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ class Color {
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;
Expand Down

0 comments on commit a101584

Please sign in to comment.