mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
The color table's menu gains Save Color Table… and Load Color Table…, as the help page describes (https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=404). - document.exportForWeb.saveColorTable writes the GIF or PNG-8 table the preview shows as a color table file in the published layout (https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/): 256 RGB entries in file order, zero-padded, then the color count and the transparent index, two bytes each, big-endian (65535 for none). It always writes 772 bytes and writes shifted colors as written. - webExport.loadColorTable reads the 768-byte and 772-byte forms and returns the settings with the file's colors, other than the transparent entry, as the fixed Custom palette and Colors set to the file's count. The table's other edits and its sort are cleared and Web Snap is set to 0, so the loaded colors are written as they are. It reads at most 773 bytes, rejects other sizes, counts of 0 or above 256, both or neither of path and dataBase64, and JPEG or PNG-24, and remembers nothing. Load Color Table… is disabled on the web. - document.exportForWeb.preview rejects a slice that is not a whole number from 1 up instead of ignoring it. Docs: docs/mcp.md, docs/target-app-parity.md.