Based on screening transformations of muffin-tin orbitals introduced by Andersen and Jepsen [Phys. Rev. Lett. 53, 2571 (1984)], we have developed a formalism for calculating the nonspherically averaged charge densities of substitutionally disordered alloys using the Korringa-Kohn-Rostoker coherent-potential-approximation (KKR CPA) method in the atomic-sphere approximation (ASA). We have validated our method by calculating charge densities for ordered structures, where we find that our approach yields charge densities that are essentially indistinguishable from the results of full-potential methods. Calculations and comparisons are reported for Si, Al, and Li. For substitutionally disordered alloys, where full-potential methods have not been implemented so far, our approach can be used to calculate reliable nonspherically averaged charge densities from spherically symmetric one-electron potentials obtained from the KKR-ASA CPA. We report on our study of differences in charge density between ordered AlLi in the L${1}_{0}$ phase and substitutionally disordered ${\mathrm{Al}}_{0.5}$${\mathrm{Li}}_{0.5}$ on a face-centered-cubic lattice.