diff options
Diffstat (limited to 'lib/public/Color.php')
-rw-r--r-- | lib/public/Color.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/public/Color.php b/lib/public/Color.php index 6c9a35ca49c..d5b2a92a6ac 100644 --- a/lib/public/Color.php +++ b/lib/public/Color.php @@ -125,6 +125,12 @@ class Color { return $palette; } + /** + * Alpha blend another color with a given opacity to this color + * + * @return Color The new color + * @since 25.0.0 + */ public function alphaBlending(float $opacity, Color $source): Color { return new Color( (int)((1 - $opacity) * $source->red() + $opacity * $this->red()), |