Skip to content

Commit eb91c0f

Browse files
committed
Revert "Allow for both hexcolors with alpha as shorthand"
This reverts commit a1932a5.
1 parent 2af93bf commit eb91c0f

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)