discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

layerSwatchRgb function

int layerSwatchRgb(
  1. DraftColor color,
  2. int foreground
)

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,
    };