Colloids that generate chemicals, or "chemically active colloids", can interact with their neighbors and generate patterns via forces arising from such chemical gradients. Examples of such assemblies of chemically active colloids are abundant in the literature, but a unified theoretical framework is needed to rationalize the scattered results. Combining experiments, theory, Brownian dynamics, and finite element simulations, we present here a conceptual framework for understanding how immotile, yet chemically active, colloids assemble. This framework is based on the principle of ionic diffusiophoresis and diffusioosmosis and predicts that a chemically active colloid interacts with its neighbors through short- and long-range interactions that can be either repulsive or attractive, depending on the relative diffusivity of the released cations and anions, and the relative zeta potential of a colloidal particle and the planar surface on which it resides. As a result, 4 types of pairwise interactions arise, leading to 4 different types of colloidal assemblies with distinct patterns. Using short-range attraction and long-range attraction (SALR) systems as an example, we show quantitative agreement between the framework and experiments. The framework is then applied to rationalize a wide range of patterns assembled from chemically active colloids in the literature exhibiting other types of pairwise interactions. In addition, the framework can predict what the assembly looks like with minimal experimental information and help infer ionic diffusivity and zeta potential values in systems where these values are inaccessible. Our results represent a solid step toward building a complete theory for understanding and controlling chemically active colloids, from the molecular level to their mesoscopic superstructures and ultimately to the macroscopic properties of the assembled materials.