Readds hashes var to sanitize_hexcolor() return values. (#2491)

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2021-01-04 17:09:19 +01:00
committed by GitHub
co-authored by Ghom Azarak
parent 04fa7388eb
commit 2c770bf48e
+2 -2
View File
@@ -87,9 +87,9 @@
return crunch + .
switch(format_input_ratio) //add or remove alpha channel depending on desired format.
if("3:8", "3:4", "6:4")
return copytext(., 1, desired_format+1)
return crunch + copytext(., 1, desired_format+1)
if("4:6", "4:3", "8:3")
return . + ((desired_format == 4) ? "f" : "ff")
return crunch + . + ((desired_format == 4) ? "f" : "ff")
else //not a supported hex color format.
return default ? default : crunch + repeat_string(desired_format, "0")