This is a two-fold question:
1. Is there a way to get my hands into the afpalette file format specification instead of reverse engineering it? I'm doing graphics for a "new" retro system called ZX Spectrum Next that has 9bit colour capabilities but can only display 256 colours at a time. I have a special program that generates palettes (in 24bit RGB format) for Photoshop, ASE, RIFF and I would like to add the capability to export to Affinity Photo. I've found an intermediate "hack-y" way to include a complete palette into AP as a last ditch effort before reverse engineering an afpalette and that was to make a fake "Pantone" csv color list. That worked as seen in the attached screenshot but the resulting afpalette cannot be saved if I try "export"... which brings me to the second question;
2. Is the afpalette file capable of storing more than 256 colours? The aforementioned hack generated a 512 colour palette (which is what I need obviously) but although AP says it's saving a palette, it won't. However if I add arbitrarily colors to a clean swatch palette (three or four - did not try more) it saves an afpalette without an apparent problem.
Any help to either 1. or 2?