mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user