It seems like we are limited to 253 colors for new images.
GFX files use 1 byte offsets to get the palette offset for the needed color -> 255 max offset
0x0 and 0x1 are used to define transparency and shadows respectively.
It's a base limitation of the engine as far as I can see it.