The three buttons act on the last color clicked (__color). After a change of reduction or color count, or through ui.dialog.set, that color can be one the table no longer shows, and a click added it to locked, transparent or webShift. The buttons are now enabled only when the table shows that color, the same check Delete Color uses.
Web shift and web snap now run before lossy compression again, so a pixel
is compared with the color its neighbor's entry is written as. Colors
shifted by hand are written after lossy, which still moves no pixel into
or out of them.
With transparent pixels and Colors at 256, a custom palette of one opaque color and 255 colors mapped to transparent has no room for the last of those, and its pixels took the nearest entry left, which could be the opaque color. Such pixels now take the transparent entry when their nearest color is one that did not fit.
A selection made before the reduction or the color count changed, or set
through ui.dialog.set, could name a color the table no longer holds. Delete
Color stayed enabled for it, added the absent color to colorTable.deleted
and fixed the table as a Custom palette although no shown color was
deleted. Delete Color is now enabled only for selected colors the table
shows and deletes only those; a selection with none of them is cleared and
the table is left unchanged.
With a fixed palette (Custom table), the colors listed in colorTable.transparent
all become the one transparent entry, so together they now take a single slot of
Colors, and the opaque colors fill the remaining slots in palette order. Before,
the palette was cut to its first entries; when those were all mapped to
transparent, every opaque pixel took one of them and the whole image turned
transparent, and with a deleted color the export was refused although an opaque
color was left past the cut. The check that a deletion leaves an opaque color
now reads the whole palette.
When no pixel is transparent and no pixel takes a color mapped to transparent,
that slot goes to the next opaque color. At 256 colors one entry stays for a
color mapped to transparent.
Lossy compression compared each pixel with the reduction's colors, so a pixel next to a color shifted by hand could join that color and be written in its new color, and a pixel of the shifted color could leave it. Lossy now leaves the entries of shifted colors alone, as it does the transparent entry.
The color table's __editColor control opens the Color Picker on a source color, as a double-click on its swatch does. ui.dialog.set refused it as a protected field; Save for Web now lists it with its other controls.
Double-clicking an opaque GIF or PNG-8 color-table swatch opens the
Color Picker. Its OK writes that color as the color picked wherever it
appears in the image; Cancel changes nothing. A shifted swatch shows the
original color at its upper left and the new one at its lower right,
with the lock mark. Double-clicking it opens the picker on the original
color, and OK on it takes the shift away. Unshift All Colors in the
table's menu clears shifts and web shifts.
- colorTable.shifted {"#source": "#rrggbb"} carries the shifts by
source color, in the settings, the remembered settings and presets.
A shifted color is kept when reducing, before locked colors, and wins
over Web Shift, Web Snap and Lock; a color mapped to transparent stays
transparent. Bad colors, duplicate keys and more than 256 entries are
refused. The preview marks shifted colors.
- GIF lossy compression compares pixels with the reduction's colors
before the table's edits, so a shifted or web-shifted color does not
take in the pixels of a nearby color.
- Web Shift replaces a shift by hand, Lock stays on for a shifted color,
and Delete Color drops a deleted color's shift.
Docs: docs/mcp.md, docs/target-app-parity.md.
The color table's trash button and Delete Color in its new menu delete
the selected GIF or PNG-8 colors. Pixels that used a deleted color take
the nearest color left, with the current reduction's color distance and
dither, and the preview matches the saved file. A click selects one
color and makes it the anchor, Shift-click selects the range from the
anchor, and Ctrl-click (Command-click on macOS) adds or removes one.
- colorTable.deleted lists the deleted colors by source. A deleted color
leaves the locked, transparent and webShift lists.
- colorTable.customPalette fixes the palette at the first deletion, so a
deleted color is not made again; the table reads Custom. Restore
Generated Table in the menu, or another reduction, clears both.
- Deleting every opaque color, or every color not mapped to transparent,
is an error and changes nothing.
- Presets and the remembered settings keep the edit.
- quantize_to uses all 256 fixed colors when no pixel is transparent.
Docs: docs/mcp.md, docs/target-app-parity.md.
A damaged .ai can give a gradient mesh whose outline is enormous but finite.
draw_mesh_raster flattened that whole outline in device pixels (grown_outline),
and kurbo's flatten then asked for more segments than memory holds: a
"capacity overflow" panic (seen in import_fuzz's ai_written_meshes_never_panic).
An outline wider or taller than 2^24 device pixels now goes to the per-quad
drawing path the function already falls back to.
A third quick click on a swatch counts as a triple click, and so does
each quick click after it. Those clicks still applied the swatch, so a
triple click on a pattern swatch opened pattern editing and then
painted the tile art with the pattern itself. Only the first click of
a run of quick clicks now applies and selects the swatch.
The test now sends four quick clicks and gives the art a solid fill in
each view, so the list view's first click is checked on its own.
Running a script or a plug-in now ends the spot color base's link, as a
batch step already did, so a script that deletes the spot color and makes
another of the same name does not make the new one the base. Commands that
only list scripts or plug-ins keep the link.
While the link waits for an Undo, the color it captures before a command is
the one the guide shows, not that of a new spot color of the same name.
The second click of a double-click on a swatch also counted as a plain
click. After the double-click opened pattern editing, which selects the
tile art, that click applied the pattern swatch to the tile, so the
pattern held a copy of itself. The second click now only opens the
editor; the first click still applies and selects the swatch.
Reported by erolkarino. #7164 by mockydevs makes the engine refuse
painting the tile with its own pattern; this change stops the swatch
panel from sending that paint on a double-click.