From d11f241bba33d7d60a1217a6125c7428e18dc23b Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 10 Sep 2023 21:05:12 +0300 Subject: [PATCH] update bg-id after upgrade to jdenticon --- src/public/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/public/index.php b/src/public/index.php index 44bc02d..47d0dca 100644 --- a/src/public/index.php +++ b/src/public/index.php @@ -23,6 +23,12 @@ $hash = crc32($data[2]); + $hex = str_split(substr(dechex($hash), 0, 6), 2); + + $r = hexdec($hex[0]); + $g = hexdec($hex[1]); + $b = hexdec($hex[2]); + $result[] = sprintf('
%s
', self::_getSignalPosition($hash), self::_getSignalPosition($hash, true), @@ -34,7 +40,7 @@ alt="%s" style="%s" />', urlencode($host), htmlentities($data[1]), - sprintf('background:#%s', substr(dechex($hash), 0, 6))))); + sprintf('background:rgba(%s,%s,%s,.3)', $r, $g, $b)))); } } }