I remember when I was writing the crossfade function in palettefade I was kind of trial-and-erroring it a bit in terms of seeing if white and black would come out as 0 and 1 or 32 and 47, since I was having to do pixel by pixel stuff when comparing the two images - worked fine in the end though. Good to know the internal logic!