mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-25 02:07:09 -06:00
effect.apply and effect.setParams stored any string as the color of Drop Shadow, Inner Glow, Outer Glow and Shift to Color. When the effect could not read it, it drew its default color with no message, so a typo such as #ff00 in the Drop Shadow dialog turned the shadow black. The commands now refuse such a color before they edit, with "`color` must be a #rrggbb color", and the document and its undo history stay as they were. Hex colors, the five named colors, [r, g, b] and color objects still pass. The check runs in the commands, so the app, command.batch steps and replayed journals get it too. The effect dialog's OK shows the error and keeps the dialog open, with Preview on or off. Saved documents open as before. Docs: docs/mcp.md (effect params).