You could also ask the row order to be reversed in the legend.
barchart(N ~ type,
groups = form,
stack = TRUE,
par.settings = simpleTheme(col = colvec),
auto.key = list(space = "right", reverse.rows = TRUE)
)