File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
library/Notifications/Widget/TimeGrid Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public static function calculateEntryColor(string $text, int $transparency): str
72
72
// so if 500 thousand colors of these 16.7 millions are so similar that we can't distinguish them,
73
73
// there's no need for such a high variance. Hence we'd still need to partition the colors in a way
74
74
// that they are distinct enough.
75
- $ hash = hexdec (hash ('sha256 ' , $ text ));
75
+ $ hash = hexdec (substr ( hash ('sha256 ' , $ text), 28 , 8 ));
76
76
// Limit the hue to a maximum of 360 as it's HSL's maximum of 360 degrees
77
77
$ h = (int ) fmod ($ hash , 359.0 ); // TODO: Check if 359 is really of advantage here, instead of 360
78
78
// The hue is already at least 1 degree off to every other, using a limited set of saturation values
You can’t perform that action at this time.
0 commit comments