improve aggregated pdf design

This commit is contained in:
Gregor Vostrak
2024-12-08 01:24:22 +01:00
committed by Constantin Graf
parent a4f3e014d9
commit 9b0cf37bc7
6 changed files with 318 additions and 127 deletions

View File

@@ -33,8 +33,12 @@ class ColorService
private const string VALID_REGEX = '/^#[0-9a-f]{6}$/';
public function getRandomColor(): string
public function getRandomColor(string $seed = null): string
{
if ($seed !== null) {
srand(crc32($seed));
}
return self::COLORS[array_rand(self::COLORS)];
}