bauhausFunctionAccent function

int bauhausFunctionAccent(
  1. BauhausDraw d
)

The function keys' corner accent colour of d (before the style stream's on/off). On grid, where the function blocks are a primary set into the ink field, the accent is the = primary (an ink corner there read as one oddly rounded corner, not an accent).

Implementation

int bauhausFunctionAccent(BauhausDraw d) => switch (d.variant) {
  BauhausVariant.paper =>
    d.assignment.op != BauhausPrimary.yellow &&
            d.assignment.eq != BauhausPrimary.yellow
        ? _argb(d.yellow)
        : _argb(d.red),
  BauhausVariant.grid => _argb(d.primary(d.assignment.eq)),
  BauhausVariant.ochre || BauhausVariant.negative => _argb(d.yellow),
  BauhausVariant.night => _argb(d.red),
};