diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm index 5f619e78985..32300cf7ff5 100644 --- a/code/__HELPERS/sanitize_values.dm +++ b/code/__HELPERS/sanitize_values.dm @@ -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")