zudo-panel-designer docs
GitHub repository

Type to search...

to open search from anywhere

The 3-color palette

The fixed 3-color palette and its physical PCB meaning, from palette.ts.

A fixed 3-entry palette

Every color in a zpd document is one of exactly three fixed entries — there is no custom-color mode. The physical PCB panel finish decides these; they are not arbitrary UI colors:

type ColorIndex = 0 | 1 | 2;
IndexNameHexPCB meaning
0black#151515Soldermask
1gold#d4af37Exposed copper, ENIG-plated
2white#f2f0e9Silkscreen
const PALETTE: readonly PaletteEntry[] = [
  { index: 0, name: 'black', hex: '#151515', note: 'soldermask' },
  { index: 1, name: 'gold', hex: '#d4af37', note: 'exposed copper (ENIG)' },
  { index: 2, name: 'white', hex: '#f2f0e9', note: 'silkscreen' },
];

Hex is display-only; the name is the contract

The hex values are display approximations for the editor UI — they are chosen to look right on screen, not to match an exact ink/plating swatch. The color names ('black' | 'gold' | 'white') are the actual contract that other packages (patterns, serialize, app) rely on, including the palette field written into an exported PanelConfig.

Lookup helper

function paletteEntry(index: ColorIndex): PaletteEntry {
  return PALETTE[index];
}

Every colorable layer field (ShapeLayer.color, PatternLayer.color, TextLayer.color, PathLayer.fill / PathLayer.stroke) stores a ColorIndex, not a hex string or a name — paletteEntry is the one place that resolves an index to its display hex and physical-layer note.