Color layer references missing palette slot
Audit code: color-layer-out-of-range
Definition
A color layer references a palette slot index that's beyond the shortest palette's color count. That layer renders transparent in any palette that doesn't have a color at that index. Either add more colors to the short palette(s) or change the layer to reference a slot within the existing range.
How Patens surfaces this
The Patens audit module checks for color-layer-out-of-range across five teaching surfaces: the edit-panel inline issue list, the
project-wide audit page, the release pre-flight check, the family hub,
and the home-page project tile. Every surface shows the same plain-English
explanation and links back to this page. This rule is detection-only — there's no automatic fix because the
correction is design-dependent (it requires a judgment call about the
glyph's intended shape or the font's intended behaviour). The audit
message links to the specific glyph or field that needs attention.
Run this check yourself
Patens runs every audit rule live as you draw — including this one.
The editor (in private alpha) shows color-layer-out-of-range firing on real
glyphs, or check your own work from the CLI:
npx patens audit your-project.font.json