mirror of
https://github.com/LucasVbr/LucasVbr.git
synced 2026-07-09 14:27:46 +00:00
Edit weather emoji, Tools color badge and duplicate tool badges
This commit is contained in:
+7
-2
@@ -30,17 +30,22 @@ class Badge:
|
||||
|
||||
icon = icons.get(self.name)
|
||||
|
||||
color_hue = Color(f'#{icon.hex}').get_hue()
|
||||
color_hsl = (color_hue, 0.75, 0.5)
|
||||
color = Color()
|
||||
color.set_hsl(color_hsl)
|
||||
|
||||
try:
|
||||
params = {
|
||||
"label": "",
|
||||
"message": icon.title,
|
||||
"color": f"#{icon.hex}",
|
||||
"color": color,
|
||||
"logo": icon.slug,
|
||||
"logoColor": LOGO_COLOR
|
||||
}
|
||||
urlParams = urlencode(params)
|
||||
self.url = f"{BASE_URL}?{urlParams}"
|
||||
self.color = Color(params["color"]).get_hue()
|
||||
self.color = color_hue
|
||||
except Exception:
|
||||
pass # Let default values
|
||||
|
||||
|
||||
Reference in New Issue
Block a user