reimplement hex->alpha conversion by hand for 2.4/3k compat