v1.3.1 - siehe Release Notes

This commit is contained in:
Borgal
2025-11-21 11:45:10 +01:00
parent 654157f174
commit 968bbdec3b
10 changed files with 209 additions and 180 deletions

View File

@@ -40,7 +40,7 @@ function get_weighted_random_color($conn)
$color_pool = [];
foreach ($colors as $color) {
$weight = $max_usage - $color['usage'] + 1; // Mindestgewicht = 1
$weight = ($max_usage - $color['usage'] + 1) ** 2;
for ($i = 0; $i < $weight; $i++) {
$color_pool[] = $color['id'];
}