  Let $K/\mathbf{Q}_p$ be a finite unramified extension,
$\overline{\rho}:\mathrm{Gal}(\overline{\mathbf{Q}}_p/K)\rightarrow\mathrm{GL}_n(\overline{\mathbf{F}}_p)$
a continuous representation, and $\tau$ a tame inertial type of dimension $n$.
We explicitly determine, under mild regularity conditions on $\tau$, the
potentially crystalline deformation ring $R^{\eta,\tau}_{\overline{\rho}}$ in
parallel Hodge--Tate weights $\eta=(n-1,\cdots,1,0)$ and inertial type $\tau$
when the \emph{shape} of $\overline{\rho}$ with respect to $\tau$ has colength
at most one. This has application to the modularity of a class of shadow
weights in the weight part of Serre's conjecture. Along the way we make
unconditional the local-global compatibility results of \cite{PQ} and further
study the geometry of moduli spaces of Fontaine--Laffaille representations in
terms of colength one weights.
