Skip to content

Commit 305abe5

Browse files
committed
Normalize the values
1 parent e299ac3 commit 305abe5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

webapp/src/Utils/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ public static function blendAlphaBackground(array $rgba, string $bg): array
404404
$result = [];
405405
$bg = static::parseHexColor($bg);
406406
for ($i=0; $i<3; $i++) {
407-
$result[] = $rgba[$i] * $rgba[3] + $bg[$i] * (1 - $rgba[3]);
407+
$result[] = ($rgba[$i] * $rgba[3] + $bg[$i] * (255 - $rgba[3]))/255;
408408
}
409409
return $result;
410410
}

0 commit comments

Comments
 (0)