  We study the pure SU(3) gauge theory in 2+1 dimensions on the lattice using
't Hooft's twisted boundary conditions to force non-vanishing center flux
through the finite volume. In this way we measure the free energy of spacelike
center vortices as an order parameter for the deconfinement transition. The
transition is of 2nd order in the universality class of the 2d 3-state Potts
model, which is self-dual. This self-duality can be observed directly in the
SU(3) gauge theory, and it can be exploited to extract critical couplings with
high precision in rather small volumes. We furthermore obtain estimates for
critical exponents and the critical temperature in units of the dimensionful
continuum coupling. Finally, we also apply our methods to the (2+1)d SU(4)
gauge theory which was previously found to have a weak 1st order transition. We
nevertheless observe at least approximate q = 4 Potts scaling at length scales
corresponding to the lattice sizes used in our simulations.
