Ugr files from images

anyone know a tool to extract a ugr colour palette from an image?

Been trying with apomap but they don’t work well in vux’s ugr parser