Le0X8 / additional-readme-stats

Enhance your profile or repository README with some additional stats!
https://armstats.leox.dev
MIT License
0 stars 0 forks source link

Icon color is getting overwritten to #0579C3 #6

Closed Le0X8 closed 3 months ago

Le0X8 commented 4 months ago

This is absolutely not intended.

The artist color should be teal but it's getting overwritten sometimes to the default color, which is blue.

I also cannot explain why this only happens sometimes.

spotify-bugged

Le0X8 commented 4 months ago

This bug seems to be caused by this line of code in src/customization/colors.php:

if (isset($query['icon_color'])) $COLORS['icon_color'] = $query['icon_color'];

All the other colors use the same code and this code works 99% of the time, so it has to be a bug within the PHP programming language.

I'll update the armstats.leox.dev server from PHP 8.1 to PHP 8.3 and hope that stuff will work properly after that.

Le0X8 commented 3 months ago

No. This is not a bug.

When visiting a profile, switching tabs causes GitHub to load the default instead of the theme-based URL.

The only bug here is that the icon color is not specified in the default URL, so this was my mistake and I shouldn't blame PHP for that.

I fixed that in my personal profile repo in this commit.