The spin states of 3d ions placed in an arbitrarily distorted coordination complex are investigated within the semiempirical modified crystal-field theory. A scheme for constructing spin-state diagrams is presented. Spin-state diagrams are obtained for transition metal ions with electron configurations 3d4, 3d5, and 3d6 placed in a pyramidal environment. The spin-state diagrams for all configurations studied display so-called “triple points”, i.e., regions where the spin states are mixed in equal proportions. The spin-state evolution of a five-coordinated Co3+ ion in the layered rare-earth cobaltite GdBaCo2O5.5 is studied. It is found that the intermediate spin state of the Co3+ ion is stabilized by the apex oxygen displacement along the pyramidal axis.