I find no restriction on the palette shift value has to be a multiple of 251. It it were, then the shift value doesn't need to be 16 bits.