We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1cd062 commit 4f31ac4Copy full SHA for 4f31ac4
webapp/src/Utils/Utils.php
@@ -352,12 +352,6 @@ public static function convertToColor(string $hex): ?string
352
*/
353
public static function parseHexColor(string $hex): array
354
{
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
- }
361
// Source: https://stackoverflow.com/a/21966100
362
$length = (strlen($hex) - 1) / 3;
363
$fact = [17, 1, 0.062272][$length - 1];
0 commit comments