layerSwatchRgb function
The 0xRRGGBB a layer of color is drawn in, as the style resolver
draws it: ACI 7 (and anything that is not a colour of its own) in the
paper's foreground, another index through aciToRgb, a true colour as
stored.
Implementation
int layerSwatchRgb(DraftColor color, int foreground) => switch (color) {
IndexedColor(aci: 7) => foreground,
IndexedColor(:final aci) => aciToRgb(aci),
TrueColor(:final rgb) => rgb,
_ => foreground,
};