Skip to content

Commit 7de6ec0

Browse files
committed
Revert "Remove alpha from hexadecimal colors"
This reverts commit 79ec81dc5cebe310ef091ebd7c1e56ac8fef4a93.
1 parent 0ccbaec commit 7de6ec0

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)