Skip to content

Commit 02e5dd5

Browse files
committed
Revert "Allow for both hexcolors with alpha as shorthand"
This reverts commit d693794c97b3bc54171e5d0efc51874ba4f4b924.
1 parent 7de6ec0 commit 02e5dd5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

webapp/src/Utils/Utils.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,7 @@ public static function timeStringDiff(string $time1, string $time2): string
290290
*/
291291
public static function convertToHex(string $color): ?string
292292
{
293-
if (preg_match('/^#[[:xdigit:]]{3,4}$/', $color) ||
294-
preg_match('/^#[[:xdigit:]]{6}$/', $color) ||
295-
preg_match('/^#[[:xdigit:]]{8}$/', $color)
296-
) {
293+
if (preg_match('/^#[[:xdigit:]]{3,6}$/', $color)) {
297294
return $color;
298295
}
299296

0 commit comments

Comments
 (0)