Skip to content

Support up to 5 colors on OpenSpool tags - #7

Open
RrrrobertB1992 wants to merge 3 commits into
paxx12:mainfrom
RrrrobertB1992:openspool-multicolor
Open

RrrrobertB1992 wants to merge 3 commits into
paxx12:mainfrom
RrrrobertB1992:openspool-multicolor

Conversation

@RrrrobertB1992

Copy link
Copy Markdown

OpenSpool Extended tags can now carry up to 4 extra colors alongside the primary color, written as additional_color_hexes. When a tag is read, its extra colors load back into colors 2-5.

  • Each extra color has its own checkbox and must be enabled before it can be set. Only enabled colors are written.
  • The next color's checkbox appears once the previous one is enabled. Disabling a color also disables the ones after it, so colors stay in order.
  • The extra colors moved from the Advanced section to sit under Color 1.
  • OpenPrintTag keeps colors 2-4 with the same per-color checkboxes. OpenSpool Compat does not write extra colors.

Related PRs

Together these let multi-color OpenSpool tags made here show all their colors on a Snapmaker U1 running the paxx12 Extended Firmware:

Testing

  • Tested with a real NFC tag. Started with 1 color, then added 1 color at a time up to 5. Every combination wrote and read back correctly, and the tag JSON was correct per the OpenSpool spec.
  • Enabled all colors with a different color in each, then disabled color 2. Only color 1 was written to the tag, as expected.
  • Also checked in a headless browser: checkbox order, the written additional_color_hexes array, tags with more than 4 extra colors being cut to 4, OpenSpool Compat leaving extras off, and OpenPrintTag colors 2-4 writing and reading back. No console errors.

Made with help from Claude

OpenSpool Extended tags can now carry up to 4 extra colors alongside
the primary one, written as `additional_color_hexes` (the array
OpenRFID reads for multi-color spools). Reading a tag loads them back
into colors 2-5.

Each extra color now has its own checkbox and must be enabled before
it can be set; only enabled colors are written. The next color's
checkbox appears once the previous one is enabled, and disabling a
color also disables the ones after it, so colors stay in order. The
extra colors moved from the Advanced section to sit under Color 1.
OpenPrintTag keeps colors 2-4 with the same per-color checkboxes.

Made with help from Claude
Once a second color is added, a "Multi-color Style" choice appears with
Gradient and Segments (Segments by default). It's written as
"color_type" next to additional_color_hexes, using OrcaSlicer's
filament_colour_type values: 0 = gradient, 1 = solid/segments. Single
color tags don't get the field, and tags without it read as Segments.
OpenSpool Compat doesn't show or write it.

Printers and OpenRFID ignore the field for now; it's there so they (and
OrcaSlicer's filament color sync) can tell the two apart later.

Made with help from Claude
RrrrobertB1992 added a commit to RrrrobertB1992/PrintTag-Web-Rrrrobert that referenced this pull request Oct 23, 2026
Where the form has a Gradient/Segments choice for multi-color spools
(paxx12#7), saved colors keep it: the same colors as a gradient and as
segments are saved as two entries, a gradient entry's color bar is drawn
as a blend, and picking an entry (or deselecting it) sets the choice to
match. Reading a tag selects the entry with the same colors and style.
Entries saved before this count as segments.

Made with help from Claude
To match the documented field (color_type: 0 = gradient, 1 = default,
which is assumed when it's missing), "color_type": 0 is written for
gradient multi-color spools and the field is left out otherwise.
Reading is unchanged: 0 is Gradient, anything else or missing is
Segments.

Made with help from Claude

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant