Add a color mosaic style to the screen channel #2

Open
solene wants to merge 1 commit from explore-mosaic into explore-truchet
Owner

The maintainer asked for the "mosaic that slowly changes hue" proposed
at the start of the visual channel work, next to the Truchet tiles.

The mosaic draws the same frames differently: rounded tesserae on a
dark background, each in one of four hues of equal luminance (OKLCH
hues 60, 150, 240, 330, chroma 0.12), carrying the two bits of the
Truchet color mode (packets 2n and 2n + 1), Gray-coded around the hue
circle. A tessera only fades from one hue to another, so no area
changes brightness; no_flash now covers the mosaic too.

The marker cores show the four hues, so the decoder compares each
tessera with the hues as this camera sees them (chroma distances,
max-log soft bits): white balance errors cancel out. The receiver
tries the mosaic when the Truchet orientations do not decode, and
first after a mosaic picture; no setting is needed. In simulation it
runs at the same 1 KB/s as Truchet with colors and survives 2.5 px of
blur, where the Truchet markers are lost.

Protocol: an addition to screen protocol version 1 (documented in
AGENTS.md). Truchet frames are unchanged; pages built before this
commit cannot read the mosaic. The audio protocol is unchanged.

CLI: airgap truchet render|svg|sim --style mosaic. Web: a Style
choice on the sending page. Tests: unit (palette, Gray code, decoding,
no flash), camera simulation with a poor color camera and blur, wasm
loopback, and the JS renderer through the fake canvas in Node.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

The maintainer asked for the "mosaic that slowly changes hue" proposed at the start of the visual channel work, next to the Truchet tiles. The mosaic draws the same frames differently: rounded tesserae on a dark background, each in one of four hues of equal luminance (OKLCH hues 60, 150, 240, 330, chroma 0.12), carrying the two bits of the Truchet color mode (packets 2n and 2n + 1), Gray-coded around the hue circle. A tessera only fades from one hue to another, so no area changes brightness; no_flash now covers the mosaic too. The marker cores show the four hues, so the decoder compares each tessera with the hues as this camera sees them (chroma distances, max-log soft bits): white balance errors cancel out. The receiver tries the mosaic when the Truchet orientations do not decode, and first after a mosaic picture; no setting is needed. In simulation it runs at the same 1 KB/s as Truchet with colors and survives 2.5 px of blur, where the Truchet markers are lost. Protocol: an addition to screen protocol version 1 (documented in AGENTS.md). Truchet frames are unchanged; pages built before this commit cannot read the mosaic. The audio protocol is unchanged. CLI: `airgap truchet render|svg|sim --style mosaic`. Web: a Style choice on the sending page. Tests: unit (palette, Gray code, decoding, no flash), camera simulation with a poor color camera and blur, wasm loopback, and the JS renderer through the fake canvas in Node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintainer asked for the "mosaic that slowly changes hue" proposed
at the start of the visual channel work, next to the Truchet tiles.

The mosaic draws the same frames differently: rounded tesserae on a
dark background, each in one of four hues of equal luminance (OKLCH
hues 60, 150, 240, 330, chroma 0.12), carrying the two bits of the
Truchet color mode (packets 2n and 2n + 1), Gray-coded around the hue
circle. A tessera only fades from one hue to another, so no area
changes brightness; no_flash now covers the mosaic too.

The marker cores show the four hues, so the decoder compares each
tessera with the hues as this camera sees them (chroma distances,
max-log soft bits): white balance errors cancel out. The receiver
tries the mosaic when the Truchet orientations do not decode, and
first after a mosaic picture; no setting is needed. In simulation it
runs at the same 1 KB/s as Truchet with colors and survives 2.5 px of
blur, where the Truchet markers are lost.

Protocol: an addition to screen protocol version 1 (documented in
AGENTS.md). Truchet frames are unchanged; pages built before this
commit cannot read the mosaic. The audio protocol is unchanged.

CLI: `airgap truchet render|svg|sim --style mosaic`. Web: a Style
choice on the sending page. Tests: unit (palette, Gray code, decoding,
no flash), camera simulation with a poor color camera and blur, wasm
loopback, and the JS renderer through the fake canvas in Node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'explore-mosaic:explore-mosaic'
git switch 'explore-mosaic'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'explore-truchet'
git merge --no-ff 'explore-mosaic'
git switch 'explore-mosaic'
git rebase 'explore-truchet'
git switch 'explore-truchet'
git merge --ff-only 'explore-mosaic'
git switch 'explore-mosaic'
git rebase 'explore-truchet'
git switch 'explore-truchet'
git merge --no-ff 'explore-mosaic'
git switch 'explore-truchet'
git merge --squash 'explore-mosaic'
git switch 'explore-truchet'
git merge --ff-only 'explore-mosaic'
git switch 'explore-truchet'
git merge 'explore-mosaic'
git push origin 'explore-truchet'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
public/data-fountain-over-audio!2
No description provided.