Stupid typo breaking RGB->palette conversion