One palette per frame, chosen by the shallowest override in the open tab

A frame is drawn in exactly one palette, or one blend of two while a palette
lane tweens. Shapes store slots and the raster index is the slot, so the
palette is only the ramp a frame is expanded through: there is no way for two
palettes' colours to share a frame. The per-palette index banks are gone.

Every symbol drawn says which palette it chooses — its lane, its instance's
palette, its own — and the shallowest wins, so a palette set on the open
symbol beats anything inside it, and a child set to one turns the whole frame
while it is drawn. Nothing chosen is the project's palette.

The palette grid follows the palette the stage is in, per tab, read from the
player rather than worked out again; mid-tween it holds the start palette.
Another can be opened per tab, with a button back to the active one.

The chooser puts the palettes the open symbol uses first, saying where, then
the project's, then palettes made in other projects (with their project, and
searchable by either name), each with the playhead's frame drawn in it;
hovering previews on the stage, `use` sets the symbol to it. The classics are
a folded shelf, now with VGA, Commodore 64, CGA and Workbench 1.3, and a new
project carries only the palette it was made with.

Unused slots are marked; solo shows and lets you click only what is drawn in
the chosen colour; ⌫ empties the open palette's unused slots in place.
The project palette can be changed in the inspector. The palette lane's
label no longer collides with the sidebar grid's styles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Olive Vaughn 2026-10-10 19:47:44 -04:00
parent 641f1fa18c
commit 1a6d6564c5
22 changed files with 865 additions and 428 deletions

View file

@ -1446,7 +1446,7 @@ button.share-button:hover, button.share-button.on { filter: brightness(1.1); }
color: var(--dim);
}
.key-nav button:disabled { opacity: .3; }
.key-nav .key { width: 16px; }
.key-nav .key { width: 16px; font-size: 15px; line-height: 1; }
.key-nav .key.keyed { color: var(--fg); }
.key-nav .key.on { color: var(--sel); }
.key-nav svg, .chan .gap svg, .prop .seg svg { width: 11px; height: 11px; }
@ -1675,38 +1675,38 @@ button.tl-gap:hover { background: rgba(47, 111, 192, .28); }
.tool svg .cut { fill: none; stroke: var(--chrome); stroke-width: 1.2; }
.tool.on svg .cut { stroke: var(--sel-bg); }
.palette { display: grid; gap: 7px; justify-items: center; padding-top: 9px; border-top: 1px solid var(--hair); }
.palette-grid { display: grid; gap: 7px; justify-items: center; padding-top: 9px; border-top: 1px solid var(--hair); }
/* The colour a new shape gets: Photoshop's foreground chip. */
.palette .chip {
.palette-grid .chip {
width: 36px; height: 36px;
display: grid; place-items: end start;
border: 1px solid var(--fg);
border-radius: 3px;
box-shadow: inset 0 0 0 2px var(--pane);
}
.palette .chip span {
.palette-grid .chip span {
margin: 0 0 2px 3px; padding: 0 3px;
border-radius: 2px;
background: rgba(255, 255, 255, .85);
color: var(--fg); font-size: 9px; line-height: 12px;
}
.palette .cells { display: grid; grid-template-columns: repeat(2, 17px); gap: 2px; }
.palette .slot { display: contents; }
.palette .cell {
.palette-grid .cells { display: grid; grid-template-columns: repeat(2, 17px); gap: 2px; }
.palette-grid .slot { display: contents; }
.palette-grid .cell {
width: 17px; height: 17px;
padding: 0;
border: 1px solid rgba(0, 0, 0, .35);
border-radius: 2px;
cursor: pointer;
}
.palette .cell:hover { border-color: var(--fg); transform: scale(1.12); }
.palette .cell.on { border-color: var(--fg); box-shadow: 0 0 0 1px var(--pane), 0 0 0 2px var(--sel); position: relative; z-index: 1; }
.palette-grid .cell:hover { border-color: var(--fg); transform: scale(1.12); }
.palette-grid .cell.on { border-color: var(--fg); box-shadow: 0 0 0 1px var(--pane), 0 0 0 2px var(--sel); position: relative; z-index: 1; }
/* Clear is no colour: a knockout. Checkered, as transparency is everywhere. */
.palette .clear,
.palette .chip.clear {
.palette-grid .clear,
.palette-grid .chip.clear {
background-color: #fff;
background-image:
linear-gradient(45deg, #c9c9c5 25%, transparent 25%, transparent 75%, #c9c9c5 75%),
@ -1756,13 +1756,13 @@ button.tl-gap:hover { background: rgba(47, 111, 192, .28); }
/* Remap: the map swatch, and the inspector's grid for a remap shape. A slot is
shown as what is under the shape will be drawn in; the original is the chip
in its corner. */
.palette .cell.map,
.palette .chip.map {
.palette-grid .cell.map,
.palette-grid .chip.map {
background: linear-gradient(135deg, #3a3f52 0 50%, #e8d9a8 50% 100%);
color: #fff; font-size: 11px; line-height: 1; text-shadow: 0 1px 1px rgba(0, 0, 0, .6);
}
.palette .cell { position: relative; }
.palette .cell .badge {
.palette-grid .cell { position: relative; }
.palette-grid .cell .badge {
position: absolute; right: -2px; bottom: -2px;
width: 7px; height: 7px;
border: 1px solid var(--pane); border-radius: 50%;
@ -1829,35 +1829,81 @@ button.tl-gap:hover { background: rgba(47, 111, 192, .28); }
.palette-row .rename { align-self: stretch; padding: 0 7px; border-color: transparent; background: none; }
.palette-row .rename:hover:not(:disabled) { border-color: var(--sel); background: #fff; }
/* The chooser: search, then sections most relevant first, then the classics
folded small at the foot. Each row is the playhead's frame in that palette,
its strip, its name and where it is from; `use` sits beside it. */
/* The list scrolls and nothing else does, so search sits at the top and the
shelf at the foot however many palettes there are between them. */
.menu.popout:has(.palette-chooser) { width: 300px; display: flex; flex-direction: column; overflow: hidden; }
.palette-popout:has(.palette-chooser) { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.palette-chooser { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; flex: 1; }
.palette-chooser .palette-list { flex: 1 1 auto; min-height: 80px; max-height: none; }
.palette-search { width: 100%; }
.palette-head {
padding: 6px 2px 2px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
color: var(--dim);
}
.palette-head:first-child { padding-top: 0; }
.palette-row .choose { grid-template-columns: auto 1fr; }
.palette-row .choose .text { display: grid; gap: 2px; min-width: 0; }
.palette-row .choose .strip { height: 9px; }
.palette-row .thumb {
width: 48px; height: 36px; object-fit: contain; border-radius: 2px;
background: #000; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3);
}
.palette-row .note {
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
font-size: 10px; color: var(--dim);
}
.palette-row .use {
align-self: stretch; padding: 0 7px; font-size: 10px;
border-color: transparent; background: none; opacity: 0;
}
.palette-row:hover .use, .palette-row .use:focus { opacity: 1; }
.palette-row .use:hover:not(:disabled) { border-color: var(--sel); background: #fff; }
.palette-editing { display: flex; align-items: center; gap: 6px; min-width: 0; }
.palette-editing .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.palette-editing .rename { padding: 0 7px; border-color: transparent; background: none; }
.palette-editing .palette-name { flex: 1; min-width: 0; }
.palette-shelf > summary {
cursor: pointer; font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
color: var(--dim); padding: 2px;
}
.palette-shelf .shelf {
display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px;
padding-top: 4px; max-height: 30vh; overflow: auto;
}
.palette-shelf .tile {
display: grid; gap: 2px; min-width: 0; padding: 3px;
border: 1px solid transparent; border-radius: 3px; background: none; text-align: left;
}
.palette-shelf .tile:hover { background: var(--sunk); border-color: var(--hair); }
.palette-shelf .tile .strip { height: 8px; }
.palette-shelf .tile .name {
font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.strip { display: flex; height: 14px; border: 1px solid rgba(0, 0, 0, .35); border-radius: 2px; overflow: hidden; }
.strip i { flex: 1; }
/* On the stage at the playhead. */
.on-stage { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
/* A palette being edited that the stage is not drawing in here. Information,
not alarm: the accent of a selection, not of a warning. */
.palette-assets-wrap { position: relative; }
.palette-info {
position: absolute; top: -3px; right: -5px;
width: 13px; height: 13px; border-radius: 50%;
display: grid; place-items: center;
background: var(--sel); color: #fff;
font: italic 600 9px/1 Georgia, serif;
cursor: help;
box-shadow: 0 0 0 1.5px var(--chrome);
/* Back to the palette the stage is in, when another is open in the grid. */
.palette-grid .back { padding: 1px 4px; font-size: 10px; white-space: nowrap; }
/* A slot nothing in the open symbol draws with. */
.palette-grid .cell.unused { opacity: .5; }
.palette-grid .cell.unused::after {
content: ""; position: absolute; inset: 0; pointer-events: none;
background: linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, .8) 45% 55%, transparent 55%);
}
.info-card {
position: fixed; z-index: 60;
width: 240px; padding: 8px 10px;
display: grid; gap: 3px;
background: var(--pane); color: var(--fg);
font: 11px/1.45 "Lucida Grande", "Segoe UI", system-ui, sans-serif;
border: 1px solid var(--sel); border-left-width: 3px; border-radius: 3px;
box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
cursor: default;
}
.info-card strong { color: #14395f; }
.palette-grid .grid-tools { display: flex; gap: 2px; }
.palette-grid .grid-tools button { padding: 0 4px; min-width: 17px; font-size: 11px; }
.palette-grid .grid-tools button.on { background: var(--sel-bg); border-color: var(--sel); }
.view-popout label { display: block; margin-bottom: 8px; }
.view-popout label:last-child { margin-bottom: 0; }
.view-popout input, .view-popout select { width: 100%; }