Skip to content

Commit 2af93bf

Browse files
committed
Revert "Remove alpha from hexadecimal colors"
This reverts commit ea05b2a.
1 parent 62fdad2 commit 2af93bf

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

webapp/src/Utils/Utils.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,6 @@ public static function convertToColor(string $hex): ?string
352352
*/
353353
public static function parseHexColor(string $hex): array
354354
{
355-
// Ignore alpha in hexstrings
356-
if (strlen($hex) === 5) {
357-
$hex = substr($hex, 0, 4);
358-
} else if (strlen($hex) === 9) {
359-
$hex = substr($hex, 0, 7);
360-
}
361355
// Source: https://stackoverflow.com/a/21966100
362356
$length = (strlen($hex) - 1) / 3;
363357
$fact = [17, 1, 0.062272][$length - 1];

0 commit comments

Comments
 (0)