actions is a uniform code. Note that this is exactly the objective used by
LEMMA (Li et al., 2022).


# The conditional colour–magnitude distribution: II. A comparison of galaxy
colour and luminosity distribution in galaxy groups

Haojie Xu1,2,3, Zheng Zheng4, Xiaohu Yang2,3,5, and Qingyang Li2,3

1Shanghai Astronomical Observatory, Chinese Academy of Sciences, Nandan Road
80, Shanghai 200240, China
2 Department of Astronomy, Shanghai Jiao Tong University, Shanghai 200240,
China
3 Key Laboratory for Particle Astrophysics and Cosmology (MOE)/Shanghai Key
Laboratory for Particle Physics and Cosmology, China
4 Department of Physics and Astronomy, University of Utah, 115 South 1400
East, Salt Lake City, UT 84112, USA
5Tsung-Dao Lee Institute, Shanghai Jiao Tong University, Shanghai 200240,
China E-mail<EMAIL_ADDRESS>(HX)E-mail<EMAIL_ADDRESS>(ZZ)

(Accepted XXX. Received YYY; in original form ZZZ)

###### Abstract

The Conditional Colour-Magnitude Distribution (CCMD) is a comprehensive
formalism of the colour-magnitude-halo mass relation of galaxies. With joint
modelling of a large sample of SDSS galaxies in fine bins of galaxy colour and
luminosity, Xu et al. (2018) inferred parameters of a CCMD model that well
reproduces colour- and luminosity-dependent abundance and clustering of
present-day galaxies. In this work, we provide a test and investigation of the
CCMD model by studying the colour and luminosity distribution of galaxies in
galaxy groups. An apples-to-apples comparison of group galaxies is achieved by
applying the same galaxy group finder to identify groups from the CCMD galaxy
mocks and from the SDSS data, avoiding any systematic effect of group finding
and mass assignment on the comparison. We find an overall nice agreement in
the conditional luminosity function (CLF), the conditional colour function
(CCF), and the CCMD of galaxies in galaxy groups inferred from CCMD mock and
SDSS data. We also discuss the subtle differences revealed by the comparison.
In addition, using two external catalogues constructed to only include central
galaxies with halo mass measured through weak lensing, we find that their
colour-magnitude distribution shows two distinct and orthogonal components, in
line with the prediction of the CCMD model. Our results suggest that the CCMD
model provides a good description of halo mass dependent galaxy colour and
luminosity distribution. The halo and CCMD mock catalogues are made publicly
available to facilitate other investigations.

###### keywords:

galaxies: distances and redshifts – galaxies: haloes – galaxies: statistics

††pubyear: 2023††pagerange: The conditional colour–magnitude distribution: II.
A comparison of galaxy colour and luminosity distribution in galaxy groups–B

##  1 Introduction

The past two decades have seen enormous growth of studying the statistical
relationship between the physical properties of galaxies and their dark matter
halos (see Wechsler & Tinker 2018 for a recent review), owing to large galaxy
surveys. A through understanding of the galaxy-halo connection is yet to be
achieved, as dark matter haloes cannot be directly observed. A full
comprehension of such a connection would not only provide us with insight into
the complex physical processes of galaxy formation and evolution, but also
enable us to infer the underlying dark matter distribution through galaxy
surveys.

Among the physical properties of galaxies that can be directly observed
through galaxy surveys, luminosity and colour are the two most indicative of
star formation activity — luminosity is a rough approximation of stellar mass,
while colour encodes information on star formation rate and history (e.g.
Blanton et al., 2005b). On the halo side, halo mass is the most important
factor in the formation and growth of haloes and their clustering (e.g.
Zentner, 2007; Tinker et al., 2011; Wang et al., 2018). Therefore,
understanding the relationship between galaxy luminosity, colour, and halo
mass is the first step in establishing a comprehensive connection between
galaxies and haloes.

The colour–magnitude–halo mass relation can be easily predicted by
cosmological hydrodynamic simulations and semi-analytic galaxy formation
models, which are computationally expensive and rely heavily on assumed
subgrid physics or galaxy formation recipes. An alternative, empirical
approach is through combining observed galaxy clustering with the
theoretically known halo clustering. Galaxy clustering is observed to depend
on both luminosity and colour (e.g. Norberg et al., 2001, 2002; Zehavi et al.,
2002, 2005, 2011; Coil et al., 2008; Xu et al., 2016), and halo clustering is
dependent on halo mass (e.g. Mo & White, 1996). The colour–magnitude–halo mass
relation can be established by tuning how galaxies with different luminosities
and colours occupy haloes of different masses to reproduce the observed
clustering. This is the core idea behind models such as the halo occupation
distribution (HOD; Jing et al., 1998; Seljak, 2000; Berlind & Weinberg, 2002;
Zheng et al., 2005) and the conditional luminosity function (CLF; Yang et al.,
2003). The HOD/CLF framework has been widely used to model luminosity-
dependent galaxy clustering (e.g. Yang et al., 2003; van den Bosch et al.,
2003; Zehavi et al., 2005, 2011). Colour-dependent clustering can be modelled
by parameterising the fraction of blue galaxies as a function of halo mass
(e.g. Zehavi et al., 2005; van den Bosch et al., 2003; Ross & Brunner, 2009).
In Zehavi et al. (2011), it is found that varying the central-to-satellite
ratio for galaxies in different colour subsamples is sufficient to capture the
trend of colour-dependent clustering at fixed galaxy luminosity. There are
also other approaches to modelling colour-dependent clustering (e.g. Skibba &
Sheth, 2009).

As an extension to the HOD/CLF framework, Xu et al. (2018) (the first paper in
this series, Xu18 hereafter) proposes the conditional colour-magnitude
distribution (CCMD) to link galaxy luminosity and colour to dark matte halo
mass. CCMD deprojects the observed galaxy colour-magnitude diagram (CMD) into
a halo-mass-dependent distribution with a decomposition into central and
satellite galaxy populations. Motivated by the colour bimodality, each
population is further divided into two components, pseudo-blue and pseudo-red.
At a fixed halo mass, the magnitude and colour distribution of each pseudo-
colour central population is described by a two-dimensional (2D) Gaussian
distribution, while the luminosity distribution of the satellite population is
parameterised as a Schechter-like function with colours following a
luminosity-dependent Gaussian distribution. The characteristic quantities that
define the four components are allowed to vary with halo mass, motivated by
previous work on HOD and CLF modelling (e.g. Yang et al., 2008; van den Bosch
et al., 2013). The CCMD parameters are obtained by simultaneously fitting the
galaxy abundances and projected two-point correlation function (2PCF)
measurements of galaxy samples defined by $\sim$80 fine luminosity and colour
bins, constructed from the Sloan Digital Sky Survey Data Release 7 Main Galaxy
Sample (SDSS DR7; York et al., 2000; Strauss et al., 2002; Abazajian et al.,
2009).

The galaxy colour–magnitude–halo mass relation derived from CCMD modelling
results can be compared to an array of galaxy-halo relations obtained from
various methods. For example, Xu18 compared the central galaxy luminosity–halo
mass relation based on the CCMD results with those from traditional HOD
modelling (Zehavi et al., 2011), galaxy-galaxy weak lensing (Mandelbaum et
al., 2006), satellite kinematics (More et al., 2011), CLF modelling of galaxy
clustering and galaxy-galaxy lensing (Cacciato et al., 2009), and generally
good agreements are found. As the galaxy-halo relation is supposed to be
readily inferred from a galaxy group catalogue (e.g. Yang et al., 2005a, 2007;
Yang et al., 2021; Tinker, 2021), they also compared the CLF from an SDSS
group catalogue and that from the best-fitting CCMD model and find
differences. This comparison turns out to be indirect, as the former is based
on groups and the latter on haloes. Groups and haloes are not equivalent due
to factors such as the group-finding algorithm, the purity and completeness of
groups, the way halo mass being assigned, and the definitions of central and
satellite galaxies (Campbell et al., 2015, Campbell15). As suggested by Xu18,
the best way to facilitate such comparisons is to construct mock galaxy
catalogues from the CCMD modelling results and apply the same group-finding
code as used in the observation to identify groups in the mock (e.g. Reddick
et al., 2013; Campbell et al., 2015; Calderon et al., 2018). This would enable
direct and fair comparisons of the colour–magnitude–halo mass relation between
the SDSS and CCMD groups.

In this paper, we present such a comparison. In addition to the CLF, we will
compare the full distribution of galaxy luminosity and colour, including the
division into contributions from central and satellite galaxies. This
comparison will serve as a useful check for the CCMD model and will test the
validity of the CCMD in reproducing the observed galaxy-group relation. Any
revealed inconsistency may lead to a revisit of the assumptions in the CCMD
model and further advance our understanding of the galaxy-halo relation.

The paper is structured as follows. In Section 2, we provide a brief overview
of the observational data set used to constrain the CCMD parameters, the CCMD
mock construction, and the group-finding algorithm. Section 3 presents a
comparison between the galaxy luminosity and colour distribution in the CCMD
groups and in the SDSS groups. Section 4 aims to uncover the CCMD features
without relying on group mass or identified group membership, by binning the
galaxy groups through dynamical mass and cross-matching with external central
galaxy catalogues. We summarise the main conclusions in Section 5.

Throughout the paper, all magnitudes and colours have been $K$-corrected to
$z\sim 0.1$, the median redshift of galaxies in the SDSS DR7 Main Galaxy
Sample. The magnitude is calculated by setting $h=1$, where $h$ is the Hubble
constant in units of 100${\rm km\,s^{-1}\,Mpc^{-1}}$. Magnitude, absolute
magnitude, and luminosity are used interchangeably. The base-10 logarithm is
denoted as $\log$. We employ a magnitude-dependent colour cut as in Zehavi et
al. (2011), $(g-r)_{\rm cut}=0.21-0.03M_{r}$, to separate blue and red
galaxies.

##  2 SDSS DR7, CCMD Mocks, and Group Finder

In this work, we compare the galaxy contents in galaxy groups identified in
SDSS data with those identified in mock galaxy catalogues based on the CCMD
model. In Section 2.1, we briefly introduce the SDSS data. The luminosity- and
colour-dependent SDSS galaxy clustering measurements are used to constrain the
CCMD model. In Section 2.2, we describe the construction of CCMD mocks and
mock redshift surveys that mimic the observation. To better understand how the
group finder can be used to evaluate the colour–magnitude–halo mass relation,
a brief introduction of the group-finding algorithm is described in Section
2.3.

For simplicity, we adopt the following naming convention throughout the work:

  * $\bullet$

CCMD haloes – $N$-body haloes used in constructing the CCMD mocks;

  * $\bullet$

CCMD groups – galaxy groups identified by applying the group finder to the
CCMD mocks;

  * $\bullet$

SDSS groups – galaxy groups identified by applying the group finder to the
SDSS DR7 data.

To differentiate the mass assigned to a galaxy group and that for a dark
matter halo, we call the former group mass $M_{g}$ and the latter halo mass
$M_{h}$.

###  2.1 SDSS DR7

We apply the group finder to the dataset SDSS DR7 (Abazajian et al., 2009).
This is the dataset that the CCMD model is based on — galaxy number densities
and galaxy clustering measurements for galaxy samples in fine bins of
luminosity and colour are simultaneously modelled with a global
parametrisation of the CCMD to obtain constraints on the CCMM parameters
(Xu18).

Specifically, galaxy positions and properties are extracted from bright1, the
large-scale structure sample of the NYU Value-Added Galaxy
Catalog111http://sdss.physics.nyu.edu/lss.html (NYU-VAGC; Blanton et al.
2005a). Before applying the group finder, we remove galaxies that do not meet
the following criteria: $0.01\leq z<0.2$ and $M_{r}<-18$. The redshift cut is
based on the redshift range of the widely used $\tt Yang\leavevmode\nobreak\
et\leavevmode\nobreak\ al.$ group catalogue
222https://gax.sjtu.edu.cn/data/Group.html (see Section 2.3). The $r$-band
absolute magnitude cut of $M_{r}<-18$ is due to the fact that the CCMD
parameters are constrained by galaxy samples more luminous than -18 mag
(Xu18).

###  2.2 CCMD mock catalogues

The group finder is applied to mock galaxy catalogues constructed based on
populating galaxies into dark matter haloes from an $N$-body cosmological
simulation, according to CCMD parameter constraints.

Figure 1:  Illustration of the conditional colour–magnitude distribution
(CCMD) formalism proposed in Xu18. The CCMD describes the distribution of
galaxy luminosity and colour as a function of halo mass. The model consists of
two populations motivated by galaxy colour bimodality, dubbed pseudo-blue and
pseudo-red, respectively, with each further separated into central and
satellite galaxies. A global parameterisation of these four colour-magnitude
distributions as a function of halo mass is developed, and the model
parameters are determined by simultaneously fitting the number densities and
two-point auto-correlation functions of 79 galaxy samples defined by fine bins
in the colour–magnitude diagram (CMD, top-left panel) of galaxies from the
SDSS DR7. The model effectively deprojects the overall galaxy CMD along the
halo mass direction (bottom cube), with the range of halo mass in terms of
$\log[M_{\rm h}/(h^{-1}{M_{\odot}})]$ labelled in each slice. Inside each
slice, the contours describe the four CCMD components from the best-fitting
model presented in Xu18 (see their fig.8). For each component, the contour
levels are $\exp(-1/2)$, $\exp(-4/2)$, and $\exp(-9/2)$ times the peak value
for this component (corresponding to the inclusion of 39, 86, and 99 per cent
of galaxies in the component for a 2D Gaussian distribution), and no overall
normalisation is applied for the contour levels of different components.

####  2.2.1 $N$-body simulation

The numerical $N$-body simulation CCMD mocks are based on is the MultiDark
MDPL2 simulation333https://www.cosmosim.org/cms/simulations/mdpl2/. The MDPL2
simulation (Klypin et al., 2016) assumes a spatially flat cosmology consistent
with the constraints of Planck (Planck Collaboration et al., 2014, 2016), with
$\Omega_{\rm m}=0.307$, $\Omega_{\rm b}=0.048$, $h=0.678$, $n_{\rm s}=0.96$,
and $\sigma_{8}=0.823$. The simulation has a box size of 1 $h^{-1}{\rm Gpc}$
(comoving) on a side with $3840^{3}$ particles, with a mass resolution of
$1.51\times 10^{9}h^{-1}{M_{\odot}}$.

The redshift zero halo catalogue is obtained by the phase-space halo finder
ROCKSTAR (Behroozi et al., 2013). It is the same halo catalogue used in Xu18
to model SDSS galaxy clustering to constrain the CCMD model with an accurate
and efficient simulation-based method (Zheng & Guo, 2016). Haloes in this
catalogue are host haloes, whose centre is not within the virial radius of a
more massive halo.

####  2.2.2 Populating galaxies

We paint $N$-body haloes with galaxies with $r$-band absolute magnitude
$M_{r}$ and $g-r$ colour according to the virial mass of host haloes based on
the best-fit CCMD modelling results in Xu18.

Xu18 introduced the CCMD model to describe the distribution of galaxy
luminosity and colour as a function of halo mass, as illustrated in Fig. 1. At
a given halo mass, the galaxy distribution in the colour–magnitude diagram
(CMD) is assumed to consist of four components, two for centrals (the pseudo-
blue central and the pseudo-red central) and two for satellites (the pseudo-
blue satellites and the pseudo-red satellites). Each central component is
described by a 2D Gaussian distribution, while the magnitudes of the satellite
components are described by a Schechter-like function and their colours by a
Gaussian distribution. Characteristic quantities444For example, for a 2D
Gaussian distribution describing the colour-luminosity distribution of a
central component, the characteristic quantities include the centre positions,
standard deviations in colour and in luminosity, and correlation strength
between colour and luminosity. of these four components are parameterised as a
function of halo mass. These parameters are determined by simultaneously
fitting the number densities and auto-correlation functions of galaxy samples
defined in $\sim$80 fine luminosity–colour bins from the SDSS DR7. Xu18
demonstrated that the CCMD model can accurately recover the observed joint
dependence of clustering on colour and luminosity, as well as the observed
global CMD.

Given the galaxy samples used to constrain the CCMD model, the CCMD mocks are
designed to best represent galaxies with $-22<M_{r}<-18$ and $0<g-r<1.2$. To
make the mocks more comprehensive, we have extended the model to include the
most luminous galaxies (i.e. $M_{r}<-22$) and those with extreme blue and red
colours (i.e. $g-r<0$ and $g-r>1.2$). Since only a small fraction of galaxies
are in these ranges, the extrapolation does not practically affect the
accuracy of the mocks and any of our results. Central galaxies are assumed to
reside at the potential minimum of their host haloes and inherit their bulk
velocities. For the satellite galaxies, we assign them the positions and
velocities of randomly chosen dark-matter particles. Neither centrals nor
satellites have assumed a velocity bias (e.g. Guo et al., 2015a, b). In
conclusion, the CCMD mocks contain galaxies with realistic magnitudes and
colours, all of which are more luminous than $M_{r}=-18$.

In addition to the mock catalogue based on the best-fitting CCMD parameters,
we also construct 20 mocks from randomly selected CCMD models from the MCMC
chain (Xu18) to address the effect of CCMD model uncertainties. The halo
catalogue and the CCMD galaxy mocks are publicly available at
https://www.astro.utah.edu/~zhengzheng/data.html.

####  2.2.3 Mock redshift surveys

To mimic the observation, we construct galaxy redshift surveys from the CCMD
mocks by placing a virtual observer at one of the corners of the simulation
box. We then compute the right ascension, declination, redshift, and apparent
$r$-band magnitude $m_{r}$ for each mock galaxy, taking into account the
peculiar velocity along the line of sight of the virtual observer and using
the same cosmology parameters as the $N$-body simulation (mainly $\Omega_{\rm
m}$ and $h$). We exclude galaxies with $m_{r}>17.6$ (the apparent magnitude
limit of NYU-VAGC bright1) and only keep galaxies within the redshift range
$0.01\leq z<0.2$. We then apply the group finder to mock redshift surveys.

For a simulation box of 1 $h^{-1}{\rm Gpc}$ on a side, the adopt maximum
redshift cut, $z<0.2$, approximately limits the mock redshift surveys to an
octant of the CCMD mocks, or 1/8 of the full sky. To make the most of the CCMD
mocks and to consider the potential effect of sample variance, we apply the
same group finder to eight octants and obtain eight corresponding sets of CCMD
groups. We then calculate the mean and standard deviation of all relevant
quantities in the CCMD groups from the eight octants.

###  2.3 Group finder

In the main text, we choose the widely used $\tt Yang\leavevmode\nobreak\
et\leavevmode\nobreak\ al.$ group finder to carry out the group-finding
process for all galaxy samples, including both CCMD mocks and SDSS DR7. The
$\tt Yang\leavevmode\nobreak\ et\leavevmode\nobreak\ al.$ group finder is a
halo-based group finder and has been tested and successfully applied to galaxy
samples with spectroscopic (Yang et al., 2005a, 2007) and/or photometric
redshift (Yang et al., 2021). We shall refer to the group finder as the $\tt
Yang\leavevmode\nobreak\ et\leavevmode\nobreak\ al.$ group finder for short,
unless otherwise specified. In the following part, we give a brief description
of how the group-finding algorithm groups galaxies and assigns the group
masses and memberships:

  1. 1.

Start by assuming that each galaxy is a tentative group.

  2. 2.

Measure the group luminosity of tentative groups. The group luminosity is the
total luminosity of all member galaxies.

  3. 3.

Assign each group a group mass by abundance-matching the cumulative group
luminosity function and pre-chosen halo mass function at the sample redshift.
Record the mass-to-light ratios. When calculating the cumulative group
luminosity function, weight groups by $1/V_{\rm BGG,max}$, the maximum volume
where the brightest member galaxy can be observed. We use the Tinker et al.
(2008) halo mass function with the mass definition $M_{\rm 200b}$. We use the
same cosmology as in the MDPL2 simulation.

    1. (a)

Recompute the group mass by the group luminosity and mass-to-light ratios from
step 3. Then compute the halo radius from the halo mass within the sphere
whose mean density is 180 times that of the background universe. Assuming the
virial theorem, compute the velocity dispersion of dark matter within a halo
by halo mass and halo radius. .

    2. (b)

Determine the galaxy memberships. Assuming that dark matter haloes follow an
NFW density profile (Navarro et al., 1997) and that galaxies follow the same
distribution as dark matter in phase space, the number density contrast of
galaxies in the redshift space relative to the group centre (the positions of
brightest member galaxy in the tentative groups) can be written as
$P_{M}(R,\Delta z)=\frac{H_{0}}{c}\frac{\Sigma(R)}{\bar{\rho}}p(\Delta z)$,
where $\Sigma(R)$ is the 2D projected density profile of the NFW profile at
projected distance $R$ to the group centre. $\bar{\rho}$ is the average
density of the universe, and $\Delta z=z-z_{\text{group}}$. $p(\Delta z)$
describes the redshift distribution of member galaxies by assuming that the
velocity dispersion of satellites follows that of dark matter. For each
galaxy, loop over all groups to compute the distance pairs $(R,\Delta z)$ to
all group centres. Assign the galaxy to the group(s) with $P_{M}(R,\Delta
z)\geq B$, where $B$ is a pre-chosen parameter that tuned from galaxy mocks.
We adopt $B=10$ the same number as used in the widely used SDSS group
catalogues. If a galaxy can be assigned to more than one group, assign it to
the one with the highest $P_{M}(R,\Delta z)$ value. If all members of one
group can be assigned to another group, merge these two groups into one group.

    3. (c)

With new determined memberships, we redetermine the central galaxy and
remeasure the group luminosity.

    4. (d)

Go back to step 3a. Iterate until there are no further changes to the group
membership.

  4. 4.

With the memberships from step 3d, go back to step 2 and iterate. Iterations
stop when the mass-to-light ratios have converged, which typically takes three
to four iterations.

Note that the algorithm presented above is adapted from Yang et al. (2021),
which is slightly different from the classical one presented in Yang et al.
(2005a, 2007), and is optimised for large deep redshift surveys including
photometric redshift data. The changes are quite minor, mainly in steps 1 and
2. For our study, we do not need the optimal group finder, as long as the same
one is used for both the CCMD mocks and the SDSS data. We have verified that
there are no significant differences in the colour–magnitude–halo mass
relation of Yang et al. (2021) and Yang et al. (2005a, 2007).

##  3 CCMD Groups VS. SDSS Groups

Figure 2:  Comparisons of CLFs from the CCMD groups and the SDSS groups. The
range of group mass in terms of $\log(M_{\rm g}/[{h^{-1}M_{\odot}}])$ is
labelled at the top of each column. The SDSS and CCMD groups are obtained by
applying the $\tt Yang\leavevmode\nobreak\ et\leavevmode\nobreak\ al.$ group
finder to the SDSS DR7 data and the CCMD mock redshift surveys, respectively.
The CLF (top row) is broken down into that of red galaxies (middle row) and
that of blue galaxies (bottom row). The CLFs with errorbars from the CCMD
groups come from the mock constructed using the best-fitting CCMD model, while
the yellow curves are from the CCMD mocks constructed using randomly sampled
CCMD parameters, representing CCMD model uncertainties. See Section 3 for more
details.

With galaxy groups identified in the SDSS data and in the CCMD mocks using the
same group finder, it becomes possible to make fair comparisons of galaxy
properties in SDSS groups and CCMD groups.

Groups serve as a proxy to dark matter haloes, but they are far from perfect
tracers of haloes. There are at least three types of failure that a group
finder can experience (following the naming convention in Campbell15):
membership allocation errors, central/satellite designation errors, and halo
mass estimation errors. In most cases, these errors are coupled to each other.
When using a group-finding algorithm to group galaxies, two partition errors
can occur: fracturing and fusing. Fracturing occurs when galaxies that belong
to the same halo are incorrectly identified as two or more groups. Fusing is
when galaxies from multiple haloes are mistakenly grouped into one. These two
issues often occur simultaneously, for example, when two haloes are correctly
identified as two groups, but one halo is fractured, and the other fused. Even
if all member galaxies are correctly identified, errors in the designation of
central and satellite galaxies can occur — the algorithm usually chooses the
brightest member as the central galaxy, while there is a considerable fraction
of haloes whose central galaxies are not the brightest (e.g. Skibba et al.,
2011; Lange et al., 2018). Furthermore, even if memberships and centrals are
correctly identified, the halo mass estimation can be inaccurate due to the
scatter and dependence on secondary properties such as galaxy colours (e.g.
Mandelbaum et al., 2016; Xu et al., 2018).

Given the nature of a group finder, groups would not provide the exact galaxy
colour-luminosity-halo mass relation, as inferred from Xu18. However, applying
the same group finder to the SDSS data and to the CCMD mocks results in the
same type of group-finding and group mass-assignment systematics in the SDSS
groups and CCMD groups, making fair comparisons.

We can treat galaxy groups from a group-finding algorithm as a way to define
the environment, and the comparisons are for environment-dependent galaxy
properties. As long as the environment is defined in the same way in the data
and in the mocks, the comparisons are meaningful. In this sense, the specific
group-finding algorithm does not matter for our study here. In Appendix B, we
perform a test by applying a different group finder (i.e. the Tinker2020 group
finder; Tinker 2020, 2021) to both CCMD mocks and SDSS data. We find that our
comparison results are consistent with those from the default group finder
that we adopt.

We make comparisons of CLFs, conditional colour functions (CCFs), and CCMDs
from the SDSS and CCMD groups, as a function of group mass. When counting
galaxies and groups from either the SDSS data or the CCMD mock redshift survey
(corresponding to an octant of the CCMD mock; see Section 2.2.3), we weigh
galaxies by $1/V_{\rm max}$ and groups by $1/V_{\rm cen,max}$, where $V_{\rm
cen,max}$ is the $V_{\rm max}$ of the central galaxies of the groups. For CLFs
and CCFs from the CCMD groups, we estimate the uncertainties from the
dispersions of the corresponding quantities among the 8 octants of the mock
catalogue. To access the CCMD model uncertainties, we also measure CLFs and
CCFs from 20 cubic mocks with CCMD parameters randomly sampled from the CCMD
modelling posteriors. Each cubic mock is further chopped into 8 octants to
mimic the SDSS surveys. In relevant plots, the corresponding CLFs and CCFs
measured from these 160 mock surveys are plotted as orange curves.

###  3.1 The conditional luminosity function (CLF)

Figure 3:  Similar to Fig. 2, but for comparisons of CCFs between the SDSS and
CCMD groups.  Figure 4:  Comparisons of CCMDs between the CCMD groups and SDSS
groups, separated into central CCMDs (top) and satellite CCMDs (bottom). In
each panel, the contour levels are $\exp(-1/2)$, $\exp(-4/2)$, and
$\exp(-9/2)$ times the maximum value in the CCMD of the SDSS groups. Note that
the CCMD groups for the comparisons are obtained from the CCMD mock
constructed with the best-fitting CCMD parameters, and the uncertainties in
the CCMD model are not reflected here.

We first compare the CLFs, the galaxy luminosity distribution as a function of
group mass, between the CCMD groups and the SDSS groups in Fig. 2.

In the top panels, the central galaxy CLFs from the SDSS groups (solid curves)
and from the CCMD groups (filled circles) appear to be remarkably similar,
given that the amplitude of the CLFs can vary by about 3 orders of magnitude
at fixed group mass. Except for the highest mass bin, the central CLFs from
both SDSS and CCMD groups show two peaks, with the lower-luminosity peak being
broader. The higher-luminosity peak from the CCMD groups shifts toward
slightly higher luminosity than that from the SDSS groups.

While it is tempting to attribute the double peaks as an indication of the two
central components in the CCMD (Xu18), our further investigations suggest an
origin more related to the effect of systematics in group mass assignment. As
pointed out by Yang et al. (2005b); Yang et al. (2008), a sharp feature in the
central CLF can result from the halo mass assignment based on the ranking of
group luminosity, particularly for low-mass haloes, which are mainly composed
of central galaxies. This issue can be addressed in deep surveys (e.g. Y. Wang
et al. 2023 in prep.) or by using the total group stellar mass as a halo mass
indicator instead. A more detailed discussion can be found in Appendix A.

If we further divide galaxies into red and blue populations using a magnitude-
dependent cut, $(g-r)_{\rm cut}=0.21-0.03M_{r}$ (Zehavi et al., 2011), the
central CLFs of the two populations (middle and bottom panels) between SDSS
and CCMD groups also show a level of agreement similar to the total
population.

In the top panels, the satellite CLFs from SDSS groups (dashed curves) and
CCMD groups (open circles) also show remarkable agreements, in both the slope
and amplitude toward the low luminosity end and the cutoff toward the high
luminosity end. The only exception lies in groups with the lowest group mass
$\log(M_{\rm g}/[{h^{-1}M_{\odot}}])\sim 12$ (in the leftmost panel), where
the satellite CLF from CCMD groups is lower in amplitude by a factor of about
two than that from the SDSS groups. When satellites are divided into blue and
red populations, the CLF for blue satellites from CCMD groups is
underestimated by a factor of about three, and that for red satellites is
overestimated by about 50 per cent. CCMD model uncertainties indicated by the
yellow curves, estimated using mocks constructed by randomly selected 20 CCMD
models in the MCMC chain, can help explain the discrepancy between satellite
CLFs in the low-mass SDSS and CCMD groups, but only partially. The discrepancy
can be a manifestation that in the CCMD model in Xu18 the data from faint blue
galaxies, given its limited volume, do not impose tight constraints on the
CCMD in low-mass haloes. A large and deep survey will help fully resolve the
discrepancy.

As a whole, except for the satellite CLFs in low-mass groups, the central and
satellite CLFs from SDSS groups and CCMD groups show excellent agreement,
implying that the CCMD model in Xu18 provides a reasonable description of the
galaxy luminosity-halo mass relation.

###  3.2 The conditional colour function (CCF)

Here, we define the conditional colour function (CCF) as the colour
distribution of member galaxies at a fixed group mass. CCF comparisons are
shown in Fig. 3.

For central galaxies, the CCFs from the SDSS groups (solid curve) agree with
those from the CCMD groups (filled circles). At each group mass, the CCF looks
like a superposition of two Gaussian-like distributions, a diffuse
distribution centred at a blue colour and a narrow distribution at a red
colour. Such features are a reflection of the two central components (pseudo-
blue and pseudo-red) in the CCMD model (Xu18). In groups of the three
intermediate mass range, $\log(M_{\rm g}/[{h^{-1}M_{\odot}}])\sim 13.0$, 13.5,
and 14.0, the CCFs from the CCMD groups have a more pronounced red tail,
overpredicting central galaxies with colour $g-r>1.1$. As there are only a
small number of extremely red galaxies in the SDSS data, it is not surprising
that the CCMD model does not accurately capture the red tail of the
distribution. Furthermore, the red tail in the CCMD model is largely from the
tail of the pseudo-blue central component, which is described as a Gaussian
distribution. The result here suggests that we may need to consider a more
sophisticated functional form to have a more accurate description of the
colour distribution of this component for an improved CCMD model.

Similar to the central CCFS, the satellite CCFs from both SDSS and CCMD groups
(dashed curves and open circles) display a bimodal distribution. As in the CLF
comparison, the CCMD model underpredicts the number of blue satellites in low-
mass groups. Like the central CCFs, the CCMD model overpredicts the red tail
of the satellite CCFs in high-mass groups, suggesting the need of an improved
functional form of the pseudo-blue satellite colour distribution.

The overall trend of the CCF from the SDSS groups, separated into those for
centrals and satellites, is well reproduced by the CCMD groups. The mismatch
of satellite CCFs in low-mass groups and the overprediction at the red tail in
both central and satellite CCFs from the CCMD groups suggest a possible
direction to improve the CCMD model.

###  3.3 The conditional colour-magnitude distribution (CCMD)

The CLF and the CCF are two projections of the CCMD. The consistency between
CLFs and CCFs from the SDSS and CCMD groups indicates good agreements between
CCMDs from the data and the mock. We turn to direct comparisons of group
CCMDs.

In Fig. 4, the CCMDs from the SDSS groups (contours) and the CCMD groups (grey
scales) are compared in groups with mass ranging from $\log(M_{\rm
g}/[{h^{-1}M_{\odot}}])\sim$ 12 to 14, separated into those of central and
satellites.

For central galaxies, the results in Xu18 show that the CCMD at fixed halo
mass has two components, one with narrow luminosity distribution but spread in
colour (the pseudo-blue component) and the other with narrow colour
distribution but spread in luminosity (the pseudo-red component). The central
CCMD at fixed group mass from the SDSS groups and CCMD groups looks like a
superposition of two components. As with the CLF, the component with a narrow
luminosity distribution has a large contribution from those groups with a
single member galaxy identified (see Appendix A). We performed tests to see
the effect caused by such groups by removing them in computing the CCMD. We
found that the CCMD still looks like a superposition of two components, while
the redder component does not have a luminosity distribution as spread as the
halo CCMD (Xu18). Therefore, it seems that the group CCMDs keep the two-
component features in the halo CCMDs but with a substantial smearing effect,
resulting from group-finding algorithms (such as member determination,
central/satellite separation, and group mass assignment).

The overall central galaxy CCMDs from the SDSS groups and the CCMD groups
display a general agreement. In groups of mass $\log(M_{\rm
g}/[{h^{-1}M_{\odot}}])\sim$ 12.5, 13.0, and 13.5, the CCMD groups tend to
have central galaxies about 0.2 mag fainter than the SDSS groups, specifically
at the luminous end.

For the satellite CCMD, the overall patterns for the SDSS groups and CCMD
groups are similar, showing a relatively tight red sequence and a diffuse blue
component. In detail, at low group mass, $\log(M_{\rm
g}/[{h^{-1}M_{\odot}}])\lesssim 13$, there are fewer satellites in the CCMD
groups. At high group mass, the agreement is remarkably good, except that the
CCMD groups have more satellites at the red tail. The comparisons are in line
with those seen in the CCF comparisons (Fig. 3).

The results of the CLF, CCF, and CCMD comparisons between the CCMD groups and
the SDSS groups are encouraging. The generic agreements suggest that the CCMD
model in Xu18 provides a good description between galaxy colour-luminosity
distribution and halo mass.

Figure 5:  Comparisons of CCMDs between the CCMD groups and the SDSS groups,
as a function of line-of-sight velocity dispersion ($\sigma_{v}$) of satellite
galaxies. The range of $\sigma_{v}$ in ${\rm km\,s^{-1}}$ is labelled at the
top of each column. In each panel, for SDSS groups and CCMD groups, the thick
contour and greyscale levels are $\exp(-1/2)$, $\exp(-4/2)$, and $\exp(-9/2)$
times the maximum value of the distribution from SDSS groups. To further
highlight the details of the CCMD from the SDSS groups, additional contour
levels (thin dotted curves) are plotted.

##  4 Additional CCMD Comparisons

The good matches between CLFs, CCFs, and CCMDs from the SDSS groups and CCMD
groups, after applying the same group finders, indicate that the colour and
luminosity dependent distribution of galaxies in the CCMD mock is a reasonable
representation of the SDSS galaxies.

In this section, we attempt to carry out further investigations of the CCMD
features from observation. Galaxy groups identified by the group finder have
systematic errors, such as group mass assignment and membership allocation.
Compared to the CCMD at fixed halo mass, the CCMD at fixed group mass has
certain features smeared out. To reduce the systematics related to group mass
assignments, in Section 4.1, we make comparisons by dividing the groups by
their dynamical group mass based on the velocity dispersion of satellite
galaxies. In addition to group mass assignment systematics, we also attempt to
reduce central/satellite designation systematics. In Section 4.2, we
investigate the colour and luminosity distribution of “true” central galaxies
extracted from two external central galaxy catalogues. The mean host halo mass
of these central galaxies has been calibrated using weak-lensing measurements.

Figure 6:  Comparisons of CCMDs of central galaxies in CCMD haloes to those
from two catalogues of SDSS central galaxies, EXT (McCarthy et al., 2022) and
LIN (Lin et al., 2016). Galaxies from the central galaxy catalogues are
divided into early-forming (E-EXT and E-LIN) and late-forming (L-EXT and
L-LIN) subsamples, based on star formation rate (sSFR; top panels) and star
formation history (SFH; bottom panels). The mean host halo masses of those
central galaxies are estimated to be in the range of $\sim 12<\log(M_{\rm
h}/[h^{-1}{M_{\odot}}])<12.5$ from weak lensing measurements, which is also
the mass range of the haloes chosen to show the central CCMD from the CCMD
mock. In the panels in the second and fourth columns, the central galaxies are
split into blue and red populations. Note that the contour levels in this
figure are $\exp(-1/2)$, $\exp(-4/2)$, and $\exp(-9/2)$ times the maximum
value of the distribution of each component, i.e. no overall normalisation is
applied for the contour levels of different components.

###  4.1 CCMD conditioned on satellite velocity dispersion

For a group with sufficient number of galaxies, the velocity dispersion
$\sigma_{v}$ of satellites can be estimated. It is a measure of the dynamical
mass of the group, which can be a good proxy for the underlying dark matter
halo mass (approximately $M_{\rm h}\propto\sigma_{v}^{3}$). This motivates us
to examine the CCMD as a function of satellite velocity dispersion.

We estimate the line-of-sight velocity dispersion from satellite galaxies for
each group that contains more than 10 members by

$\sigma_{v}=c\sqrt{\frac{1}{N_{\rm sat}-1}\sum^{N_{\rm
sat}}_{i=1}\left(\frac{z_{{\rm sat},i}-\overline{z_{\rm sat}}}{1+z_{\rm
group}}\right)^{2}},$ (1)

where $c$ is the speed of light. We take $z_{\rm group}$ as the mean redshift
of all group satellites, and we have verified that the CCMD results remain
unchanged if we replace it with the redshift of the brightest member galaxy or
the luminosity-weighted redshift of all group members.

The CCMD as a function of the line-of-sight velocity dispersion is shown in
Fig. 5. To have sufficient statistics, we divide the groups into three broad
bins, with satellite velocity dispersion $\sigma_{v}\sim$ [0, 210], [210,
300], and [300, 500] ${\rm km\,s^{-1}}$, respectively. If we assume satellites
follow the velocity of dark matter particles (i.e., with velocity bias
neglected), the three ranges approximately correspond to halos of mass
$\log(M_{\rm h}/[h^{-1}{M_{\odot}}])\sim$ below 13.0, between 13 and 13.5, and
between 13.5 and 14.1, respectively.

For the central CCMDs, those from the CCMD groups appear to have a slight
shift toward higher luminosity, in comparison with those from the SDSS groups,
which could imply the existence of a satellite velocity bias (e.g. Guo et al.,
2015b). In both cases, the central CCMD shows two approximately orthogonal
components, consistent with the CCMD model. There is another noticeable
difference between the CCMDs from the SDSS and CCMD groups – the component
with a narrow luminosity distribution is more prominent in the CCMD groups.
Neglecting a velocity bias in central galaxies may contribute to such a
difference, as the central velocity bias can affect the designation of central
and satellite galaxies. Further investigation is needed to understand why the
difference here is more significant than that seen in the group mass (Fig. 4).

Satellite CCMDs from the CCMD and SDSS groups show remarkable agreement. Note
that the levels of inner contour and outer contour in each panel differ by a
factor of about 50. As with the group-mass-based CCMDs, the CCMD groups have a
more extended tail of red galaxies.

With groups divided by satellite velocity dispersion, the CCMD and SDSS groups
show broad agreements in central CCMDs and good match in satellate CCMDs. The
differences in the fine features of central CCMDs are worth a more detailed
study.

###  4.2 CCMD based on catalogues of central galaxies

The central/satellite designation systematics from any group finder can smear
out features in the CCMDs. There are efforts to reduce such systematics by
applying certain criteria to select central galaxies with identified galaxy
groups (e.g. Lin et al., 2016). Here we attempt to make a comparison between
the CCMDs from such central galaxies and the CCMD model in Xu18.

Xu18 found that at fixed halo mass the CCMD of central galaxies is composed of
two orthogonal components: a red component that is narrow in colour and
extended in magnitude, and a blue component that is narrow in magnitude and
extended in colour. Xu et al. (2022) used semi-analytical models of galaxy
formation and hydrodynamic simulations to investigate the CCMD of central
galaxies and found evidence of these two components. We aim to look for this
feature directly in the data. Ideally, we need a complete and pure catalogue
of central galaxies, where all centrals are identified, and no satellite
interlopers are present. Additionally, instead of the assigned group mass, it
would be good to have the host halo mass.

Lin et al. (2016) created two catalogues of central galaxies with similar halo
masses but different star-formation activities. They first selected central
galaxies from the $\tt Yang\leavevmode\nobreak\ et\leavevmode\nobreak\ al.$
group catalogue (Yang et al., 2007) and then removed satellites that could
have been misidentified as centrals. They divided central galaxies into early
and late samples and applied a few further selection criteria with the
intention that the two types of galaxies reside in haloes of similar mass. The
mean halo masses of these two types of central galaxy samples are measured
through weak lensing and are found to be in the range of $\log(M_{\rm
h}/[h^{-1}{M_{\odot}}])\sim$ 12.0 to 12.5. We name these catalogues LIN
hereafter. McCarthy et al. (2022) extend the LIN catalogues by increasing the
halo mass range, and these extended catalogues were named EXT. The division of
the early and late centrals in both the LIN and EXT catalogues is based on two
criteria: star formation history (SFH) and specific star formation rate
(sSFR).

In Fig. 6, we compare the CCMD of central galaxies in the EXT (left two
columns) and LIN catalogues (right two columns) with the CCMD of central
galaxies in the CCMD mocks in haloes with a mass range of $12<\log(M_{\rm
h}/[h^{-1}{M_{\odot}}])<12.5$. The sSFR-based central galaxy samples show two
orthogonal components (top row). When divided into late and early subsamples,
the early subsamples in both catalogues are narrow in colour and extended in
luminosity, while the late ones are narrow in luminosity and extended in
colour. The broad features are consistent with the expectations from the CCMD
model.

In the SFH catalogues (bottom row), two orthogonal components are still
visible, though much less prominent than in the sSFR catalogues.
Interestingly, the SFH-based early (late) subsample displays a blue (red)
component, suggesting that colour is more closely associated with recent star
formation (largely characterised by sSFR) than with the overall history of
star formation.

In detail, the central galaxy CCMD from either the LIN and EXT catalogues with
early/late galaxy division from either SFH or sSFR does not match the
predicted one from the CCMD model (grey scale). This is not surprising, as
there are systematics in defining the central galaxy samples, and the
comparison is not an apples-to-apples comparison. In constructing central
galaxy samples, it is still possible that the satellite decontamination step
may have removed some true central galaxies and not all satellites were
eliminated. While the mean halo masses of early and late galaxies are measured
from weak lensing, they may have different distributions, which makes it less
clear which halo mass range in the CCMD mock to use for the comparison.
Furthermore, the CCMD model only has colour and luminosity information, and
comparisons with sSFR- and SFH-based samples are not straightforward. With all
of the caveats in mind, the two-component CCMD feature shown in the central
catalogues lends support to the CCMD model.

##  5 Discussions and Conclusions

The CMD of galaxies exhibits a bimodal distribution that holds significant
information about the formation and evolution of galaxies. To explore this
distribution from the perspective of dark matter haloes, Xu18 developed the
CCMD model. This model describes the colour and luminosity distribution of
galaxies as a function of halo mass. It is composed of two colour populations,
each of which is further divided into central and satellite galaxies. The
model parameters were determined by simultaneously fitting the abundances and
two-point auto-correlation functions of $\sim$80 galaxy samples defined by
fine bins in the CMD from SDSS DR7. The CCMD extends the CLF framework by
adding the colour dimension, providing a novel approach to probe the
relationship between galaxies and dark matter haloes.

The results of the CCMD modelling can be compared with the galaxy-halo
connections inferred from other methods. In particular, colour and luminosity
distributions of galaxies in galaxy groups are closely related to CCMD, as
groups are thought to be a good proxy for haloes, making them natural targets
for comparing CCMD modelling results with those from galaxy groups. However,
systematics such as incorrect membership assignment and inaccurate group mass
assignment within a group-finding algorithm prevent a meaningful comparison,
as shown in Xu18. To address this, we construct a mock galaxy catalogue by
populating haloes in $N$-body simulations in accordance with the best-fitting
CCMD model and then apply the same group finder to both the mock catalogue and
the observational data. This ensures that both the CCMD groups (identified by
the group finder in the CCMD mocks) and the SDSS groups (identified by the
group finder in SDSS DR7) are subject to the same systematics. We also
construct CCMD mock catalogues from a set of models randomly drawn from the
CCMD posterior, and the corresponding CCMD groups from them are used to assess
the model uncertainties in the comparison.

The comparison between CCMD groups and SDSS groups yields several key
findings.

  * (1)

The galaxy groups from the CCMD mocks are similar to those from the SDSS DR7
data in terms of CLF, CCF, and CCMD for central and satellite galaxies,
regardless of the group finder used (cf. Figs. 2, 3, 4 and Figs. 11, 12, 13).
The agreements provide support for the validity of the CCMD modelling results.
For groups with mass $\log(M_{\rm g}/[{h^{-1}M_{\odot}}])<12.5$, the CCMD
mocks underestimate the number of faint blue satellites. This can result from
the limited constraining power for the CCMD in low-mass haloes, caused by the
small survey volume for those galaxies.

  * (2)

When groups are binned according to the line-of-sight velocity dispersion of
satellite galaxies, a proxy to halo mass, the central galaxy CCMD from the
CCMD groups shows a slight shift with respect to that from the SDSS groups.
The match in detailed distributions of colour and luminosity between the CCMD
and SDSS groups is less impressive than that based on group mass, which can be
an indication of galaxy velocity bias (not included in the CCMD mocks). The
satellite CCMDs, on the other hand, show good agreement between the CCMD and
SDSS groups (cf. Fig. 5).

  * (3)

We also make use of catalogues of central galaxies selected by applying
additional procedures to a galaxy group catalogue to remove satellite
contamination, with the mean halo mass measured through weak lensing. The
colour and luminosity distribution of central galaxies shows two distinct
components that are orthogonal to each other, a red component that is narrow
in colour but wide in luminosity, and a blue component that is restricted in
luminosity but broad in colour. Such a two-component distribution agrees with
the predictions of the CCMD model (cf. Fig. 6).

  * (4)

It has been demonstrated that the group finder, which determines the mass of a
group based on the total luminosity of its member galaxies, would generate a
false double-peak feature in the CLF of central galaxies, regardless of the
input CLF shape (cf. Fig. 10). The feature can be hidden when the CLF is
evaluated using galaxies in a limited volume and/or with a wide group mass and
luminosity bin (cf. Figs. 7, 9).

As a follow-up study of Xu18, this work aims to have an apples-to-apples
comparison between the galaxy colour–magnitude–halo mass relations inferred
from Xu18 and from the group catalogues. The results suggest that the CCMD
mocks provide a good representation of the galaxy distribution in the universe
and the galaxy colour and luminosity distribution of galaxies in haloes.

The differences revealed in the comparison need further investigation,
including the slight shift in the central CCMD, lower amplitude in satellite
CLFs in low-mass groups from the CCMD mock, extended red tail of galaxies in
the CCMD modk, and fine details in the central CCMD based on satellite
velocity dispersion. These can be related to cosmology (e.g. redshift of
simulations used in constructing mocks), insufficiency in the CCMD
parameterisation, limited constraining power from galaxy surveys for low-
luminosity galaxies, and central and satellite velocity bias effect.

Meanwhile, realistic mock catalogues, such as those constructed in this work,
allow for an array of investigations. For example, they can be used to test
the systematics of group-finding algorithms and help improve the performance
of group finders. As the mocks use halo mass as the sole variable to determine
the galaxy content in haloes, no assembly bias effect (e.g. Gao et al., 2005)
is built in. Comparing certain statistics in the mock and in the data can help
constrain galaxy assembly bias. For instance, they can be applied to test the
galactic conformity (e.g. Weinmann et al., 2006; Campbell et al., 2015;
Calderon et al., 2018; Tinker et al., 2018), separating the true effect (if
there is any) from that artificially induced by the systematics of group
finder. We reserve such investigations for future work. CCMD modelling with
data from large galaxy surveys, such as the Dark Energy Spectroscopic
Instrument (DESI; DESI Collaboration et al. 2016) survey, will lead to more
investigations and applications and allow stringent comparisons to help
understanding galaxy formation and evolution.

## Acknowledgements

The authors thank Kevin S. McCarthy and Yen-Ting Lin for supplying their
collections of central galaxies. The authors thank Houjun Mo and Jiaxin Han
for helpful discussions. HX expresses appreciation to the Department of
Astronomy at Shanghai Jiao Tong University for their hospitality. The support
and resources from the Center for High Performance Computing at the University
of Utah are gratefully acknowledged. This work is supported by the National
Science Foundation of China (Nos. 11833005, 11890692), 111 project No. B20019,
and Shanghai Natural Science Foundation, grant No.19ZR1466800. We acknowledge
science research grants from the China Manned Space Project with No.CMS-
CSST-2021-A02.

The CosmoSim database used in this paper is a service by the Leibniz-Institute
for Astrophysics Potsdam (AIP). The MultiDark database was developed in
cooperation with the Spanish MultiDark Consolider Project CSD2009-00064. The
authors gratefully acknowledge the Gauss Centre for Supercomputing e.V.
(www.gauss-centre.eu) and the Partnership for Advanced Supercomputing in
Europe (PRACE, http://www.prace-ri.eu) for funding the MultiDark simulation
project by providing computing time on the GCS Supercomputer SuperMUC at
Leibniz Supercomputing Centre (LRZ, http://www.lrz.de).

During the work, we make use of the following software: colossus (Diemer,
2018), halotools v0.7 (Hearin et al., 2017), regressis (Chaussidon et al.,
2022), handy (Li, 2023).

## Data Availability

The halo catalogues and CCMD mocks are publicly available at
https://www.astro.utah.edu/~zhengzheng/data.html. All intermediate data
underlying the paper figures/results are available on reasonable request.

## References

  * Abazajian et al. (2009) Abazajian K. N., et al., 2009, ApJS, 182, 543
  * Behroozi et al. (2013) Behroozi P. S., Wechsler R. H., Wu H.-Y., 2013, ApJ, 762, 109
  * Berlind & Weinberg (2002) Berlind A. A., Weinberg D. H., 2002, ApJ, 575, 587
  * Blanton et al. (2005a) Blanton M. R., et al., 2005a, AJ, 129, 2562
  * Blanton et al. (2005b) Blanton M. R., Eisenstein D., Hogg D. W., Schlegel D. J., Brinkmann J., 2005b, ApJ, 629, 143
  * Cacciato et al. (2009) Cacciato M., van den Bosch F. C., More S., Li R., Mo H. J., Yang X., 2009, MNRAS, 394, 929
  * Calderon et al. (2018) Calderon V. F., Berlind A. A., Sinha M., 2018, MNRAS, 480, 2031
  * Campbell et al. (2015) Campbell D., van den Bosch F. C., Hearin A., Padmanabhan N., Berlind A., Mo H. J., Tinker J., Yang X., 2015, MNRAS, 452, 444
  * Chaussidon et al. (2022) Chaussidon E., et al., 2022, MNRAS, 509, 3904
  * Coil et al. (2008) Coil A. L., et al., 2008, ApJ, 672, 153
  * DESI Collaboration et al. (2016) DESI Collaboration et al., 2016, arXiv e-prints, p. arXiv:1611.00036
  * Diemer (2018) Diemer B., 2018, ApJS, 239, 35
  * Gao et al. (2005) Gao L., Springel V., White S. D. M., 2005, MNRAS, 363, L66
  * Guo et al. (2015a) Guo H., et al., 2015a, MNRAS, 446, 578
  * Guo et al. (2015b) Guo H., et al., 2015b, MNRAS, 453, 4368
  * Hearin et al. (2017) Hearin A. P., et al., 2017, AJ, 154, 190
  * Jing et al. (1998) Jing Y. P., Mo H. J., Börner G., 1998, ApJ, 494, 1
  * Klypin et al. (2016) Klypin A., Yepes G., Gottlöber S., Prada F., Heß S., 2016, MNRAS, 457, 4340
  * Lange et al. (2018) Lange J. U., van den Bosch F. C., Hearin A., Campbell D., Zentner A. R., Villarreal A. S., Mao Y.-Y., 2018, MNRAS, 473, 2830
  * Li (2023) Li Z., 2023, syrte/handy, doi:10.5281/zenodo.7533563, https://github.com/syrte/handy
  * Lin et al. (2016) Lin Y.-T., Mandelbaum R., Huang Y.-H., Huang H.-J., Dalal N., Diemer B., Jian H.-Y., Kravtsov A., 2016, ApJ, 819, 119
  * Mandelbaum et al. (2006) Mandelbaum R., Seljak U., Kauffmann G., Hirata C. M., Brinkmann J., 2006, MNRAS, 368, 715
  * Mandelbaum et al. (2016) Mandelbaum R., Wang W., Zu Y., White S., Henriques B., More S., 2016, MNRAS, 457, 3200
  * McCarthy et al. (2022) McCarthy K. S., Zheng Z., Guo H., Luo W., Lin Y.-T., 2022, MNRAS, 509, 380
  * Meng et al. (2022) Meng J., Li C., Mo H., Chen Y., Jiang Z., Xie L., 2022, arXiv e-prints, p. arXiv:2210.17186
  * Mo & White (1996) Mo H. J., White S. D. M., 1996, MNRAS, 282, 347
  * More et al. (2011) More S., van den Bosch F. C., Cacciato M., Skibba R., Mo H. J., Yang X., 2011, MNRAS, 410, 210
  * Navarro et al. (1997) Navarro J. F., Frenk C. S., White S. D. M., 1997, ApJ, 490, 493
  * Norberg et al. (2001) Norberg P., et al., 2001, MNRAS, 328, 64
  * Norberg et al. (2002) Norberg P., et al., 2002, MNRAS, 332, 827
  * Planck Collaboration et al. (2014) Planck Collaboration et al., 2014, A&A, 571, A16
  * Planck Collaboration et al. (2016) Planck Collaboration et al., 2016, A&A, 594, A13
  * Reddick et al. (2013) Reddick R. M., Wechsler R. H., Tinker J. L., Behroozi P. S., 2013, ApJ, 771, 30
  * Ross & Brunner (2009) Ross A. J., Brunner R. J., 2009, MNRAS, 399, 878
  * Seljak (2000) Seljak U., 2000, MNRAS, 318, 203
  * Skibba & Sheth (2009) Skibba R. A., Sheth R. K., 2009, MNRAS, 392, 1080
  * Skibba et al. (2011) Skibba R. A., van den Bosch F. C., Yang X., More S., Mo H., Fontanot F., 2011, MNRAS, 410, 417
  * Strauss et al. (2002) Strauss M. A., et al., 2002, AJ, 124, 1810
  * Tinker (2020) Tinker J. L., 2020, arXiv e-prints, p. arXiv:2007.12200
  * Tinker (2021) Tinker J. L., 2021, ApJ, 923, 154
  * Tinker et al. (2008) Tinker J., Kravtsov A. V., Klypin A., Abazajian K., Warren M., Yepes G., Gottlöber S., Holz D. E., 2008, ApJ, 688, 709
  * Tinker et al. (2011) Tinker J., Wetzel A., Conroy C., 2011, arXiv e-prints, p. arXiv:1107.5046
  * Tinker et al. (2018) Tinker J. L., Hahn C., Mao Y.-Y., Wetzel A. R., Conroy C., 2018, MNRAS, 477, 935
  * Wang et al. (2018) Wang H., et al., 2018, ApJ, 852, 31
  * Wechsler & Tinker (2018) Wechsler R. H., Tinker J. L., 2018, ARA&A, 56, 435
  * Weinmann et al. (2006) Weinmann S. M., van den Bosch F. C., Yang X., Mo H. J., 2006, MNRAS, 366, 2
  * Xu et al. (2016) Xu H., Zheng Z., Guo H., Zhu J., Zehavi I., 2016, MNRAS, 460, 3647
  * Xu et al. (2018) Xu H., Zheng Z., Guo H., Zu Y., Zehavi I., Weinberg D. H., 2018, Monthly Notices of the Royal Astronomical Society, 481, 5470
  * Xu et al. (2022) Xu X., Zheng Z., Guo Q., 2022, MNRAS, 516, 4276
  * Yang et al. (2003) Yang X., Mo H. J., van den Bosch F. C., 2003, MNRAS, 339, 1057
  * Yang et al. (2005a) Yang X., Mo H. J., van den Bosch F. C., Jing Y. P., 2005a, MNRAS, 356, 1293
  * Yang et al. (2005b) Yang X., Mo H. J., Jing Y. P., van den Bosch F. C., 2005b, MNRAS, 358, 217
  * Yang et al. (2007) Yang X., Mo H. J., van den Bosch F. C., Pasquali A., Li C., Barden M., 2007, ApJ, 671, 153
  * Yang et al. (2008) Yang X., Mo H. J., van den Bosch F. C., 2008, ApJ, 676, 248
  * Yang et al. (2021) Yang X., et al., 2021, ApJ, 909, 143
  * York et al. (2000) York D. G., et al., 2000, AJ, 120, 1579
  * Zehavi et al. (2002) Zehavi I., et al., 2002, ApJ, 571, 172
  * Zehavi et al. (2005) Zehavi I., et al., 2005, ApJ, 630, 1
  * Zehavi et al. (2011) Zehavi I., et al., 2011, ApJ, 736, 59
  * Zentner (2007) Zentner A. R., 2007, International Journal of Modern Physics D, 16, 763
  * Zheng & Guo (2016) Zheng Z., Guo H., 2016, MNRAS, 458, 4015
  * Zheng et al. (2005) Zheng Z., et al., 2005, ApJ, 633, 791
  * van den Bosch et al. (2003) van den Bosch F. C., Yang X., Mo H. J., 2003, MNRAS, 340, 771
  * van den Bosch et al. (2013) van den Bosch F. C., More S., Cacciato M., Mo H., Yang X., 2013, MNRAS, 430, 725

##  Appendix A On the double-peak feature in the group-based CLF of central
galaxies

In this appendix, we investigate the double-peak feature in the CLF of central
galaxies from some group mass bins, as seen in Fig.2.

###  A.1 Why was a prominent double-peak feature in the CLF not seen in
previous work?

Figure 7:  Dependence of the group-based CLF of central galaxies on evaluation
volume from the CCMD mock. The evaluation volume to compute the CLF is
determined by the redshift cut $z_{\max}$. The double-peak feature is
prominent when evaluated in the entire volume ($z_{\rm max}=0.2$), but it
begins to diminish as the evaluation volume reduces. For comparison, the halo-
based CLF of central galaxies is plotted as the solid curve in each panel. The
range of halo/group mass in terms of $\log(M_{\rm h}/[h^{-1}{M_{\odot}}])$ is
indicated at the top of each column.

The double-peak feature in some mass bins of the group-based CLF of central
galaxies is not as prominent in previous studies. For example, in fig.2 of
Yang et al. (2008), the group-based CLF slightly displays a hint of the
double-peak feature in the central CLF of $12.9<\log(M_{\rm
g}/[{h^{-1}M_{\odot}}])<13.2$ groups. The feature is also barely seen in fig.1
of Meng et al. (2022).

In Fig. 7, when the group-based CLF is evaluated across the entire volume
(i.e. $z_{\rm max}=0.2$) of the CCMD mock, it shows a distinct double peak
feature. However, when the CLF is evaluated in a reduced volume, the double-
peak feature begins to diminish, resembling the CLF observed in previous
studies.

We investigate the cause of the disappearance of the more luminous peak by
selecting a group mass bin of $12.9<\log(M_{\rm g}/[{h^{-1}M_{\odot}}])<13.1$,
where the CLF profile changes significantly as the volume decreases. In Fig.
8, we measure the mean redshift of the central galaxies as a function of
luminosity. Surprisingly, there is a peak in the mean redshift distribution,
located precisely at the luminosity of the more luminous peak. This appears to
explain why the more luminous peak fades away in limited volume. We find that
most of these more luminous centrals are at higher redshifts and are the only
members of their host groups, with the satellites being too faint to be
detected. As a consequence of the group mass assignment (based on the rank of
group luminosity), those single-member groups at higher redshifts are assigned
a group mass similar to groups at lower redshifts with less luminous centrals
but with detectable satellites.

In addition to the volume effect, both the bin widths of the group mass and
the luminosity used to show the CLF would also affect the prominence of the
double-peak feature, as demonstrated in Fig. 9. CLF presented with a wider
galaxy luminosity bin from groups of a larger range of group mass would smear
out the double-peak feature.

In summary, the double-peak feature in the central galaxy CLF should be
present as long as the group mass is determined by the rank of group
luminosity. It can be obscured by a variety of factors, such as the volume
used to choose galaxy groups for computing the CLF, group mass bin width, and
luminosity bin width.

Figure 8:  Group-based CLF of central galaxies at group mass $\log(M_{\rm
g}/[{h^{-1}M_{\odot}}])\sim 13$ and properties of the groups used to compute
the CLF, based on groups identified in the CCMD mock. The black solid curve is
the CLF from groups in a volume with $z_{\rm max}=0.2$. Red circles indicate
the mean redshift of central galaxies as a function of luminosity, while blue
circles represent the mean number of member galaxies in the groups as a
function of the central galaxy luminosity. The errorbars on the circles are
estimated from groups in eight octants of the CCMD mock.  Figure 9:  Similar
to Fig. 7 for $z_{\rm max}=0.2$, but with a larger group mass bin width and a
larger luminosity bin width ($\Delta M_{r}=0.4$ mag; same as in fig.1 of Meng
et al. 2022). Compared to the prominent double-peak feature seen in Figure 7,
the CLF evaluated with a coarser bin of group mass and luminosity appears to
be close to a Gaussian profile, as seen in previous studies.

###  A.2 Does the double-peak feature seen in the group-based central CLF
indicate two CCMD components?

The group-based central CLF exhibits a double-peak profile when measured from
the entire volume, which looks like the superposition of a wide Gaussian
profile and a narrow Gaussian profile. This feature seems to back up the CCMD
modelling results of two orthogonal central components, a pseudo-blue (pseudo-
red) population narrow (broad) in luminosity (Xu18).

However, our test rules out such an explanation. In Appendix A.1, we already
show that the narrow peak feature in the central CLF is a group mass
assignment effect. It should not depend on the exact shape of the central CLF.
In Fig. 10, we demonstrate this by applying the group finder to a CCMD mock
with only the pseudo-red central component, whose halo-based CLF has a wide
Gaussian profile (black solid curve). As we can see from the figure, the
measured CLFs from groups across the entire volume display a double-peak
feature.

Given the above investigations, we conclude that when using galaxy groups to
study galaxy CCMD, additional care should be taken in connecting group-based
CCMD to halo-based CCMD and the group finding algorithm needs to be accounted
for to interpret the features.

Figure 10:  Similar to Fig. 7, but from the CCMD mock with one central galaxy
component removed. The pseudo-blue central galaxies are removed from the CCMD
mock before applying the group finder. In this modified mock, the shape of the
input halo-based CLF for central galaxies is Gaussian (solid curves). However,
when estimated in large volume, the group finder produces an artificial
double-peak profile in the CLFs (dashed curves for different redshift cuts).

##  Appendix B Comparisons with the Tinker2020 Group Finder

Figure 11:  Similar to Fig. 2, but the CLFs are from the CCMD groups and the
SDSS groups identified by applying the Tinker2020 group finder to both the
CCMD mocks and SDSS DR7. More information can be found in Section B.

In the main text, we present the comparison between SDSS groups and CCMD
groups based on the $\tt Yang\leavevmode\nobreak\ et\leavevmode\nobreak\ al.$
group finder, which suggests that the CCMD inferred from Xu18 provides a good
description of the relation between galaxy colour and luminosity and halo
mass. For the purpose of the work in this paper, it does not matter which
group finder is adopted. Nevertheless, it is useful to make comparisons with
another group finder with different performances and systematics. In this
section, we apply the Tinker2020 group finder to both SDSS DR7 and the CCMD
mocks and compare the results.

The Tinker2020 group finder (Tinker, 2020, 2021) was designed to expand the
halo-based group-finding algorithm. This extension takes into account the
colour-dependent clustering and total satellite luminosity from deep imaging
surveys, to account for any potential unknown discrepancies between the
galaxy-halo connection for star-forming and quiescent galaxies. After testing
the algorithm against mocks, they implemented a more sophisticated halo mass
assignment algorithm. By applying this updated version group finder to the
SDSS DR7, they constructed a group catalogue that well reproduces the halo
mass estimated by weak lensing analysis for both star-forming and quiescent
central galaxies. See full details in Tinker (2021).

The Tinker2020 group finder and its SDSS DR7 group catalogue are publicly
available (https://www.galaxygroupfinder.net/). To make a fair comparison, we
apply the Tinker2020 group finder to the VAGC $bright1$ catalogue, against
which the CCMD parameters were tuned. The resulting group catalogue may differ
from the public one (which is constructed from $bright34$). We apply the same
magnitude and redshift cut as in the main text to the SDSS data (Section 2.1)
and CCMD mocks (Sections 2.2.2 and 2.2.3) before running the group finder.

In addition to galaxy positions, luminosity, and colour, a secondary parameter
(such as stellar velocity dispersion, galaxy size, and morphological
information) is needed as input information to the Tinker2020 group finder for
more accurate halo mass/membership assignments. Among the list of secondary
parameters, they chose the galaxy concentration, which is the ratio between
the radius that contains 90 per cent of the galaxy light to the half-light
radius. However, the CCMD mock does not have such information for galaxies. As
a solution, each CCMD mock galaxy is assigned the concentration of a SDSS
galaxy that is closest to it in the colour-magnitude space. The code outputs a
satellite probability for each galaxy to define central and satellite
galaxies, and we use the default threshold, $P_{\rm sat}>0.5$, to distinguish
the two.

Note that when applying the Tinker2020 group finder to both the VAGC $bright1$
catalogue and the CCMD mocks, we employ the best-fit free parameters listed in
Table 1 of Tinker (2021). Since our data set is different from the public
version (i.e. $bright1$ VS. $bright34$), in principle, we should re-tune these
parameters by fitting the colour-dependent clustering and total satellite
luminosity present in our data set during the group-finding process. In other
words, the configuration we used here might not be optimal in terms of the
performance of the finding groups. However, as we emphasise in the main text,
the comparisons hold as long as the same group finder is applied to both the
data and the mock, regardless of its performance. Furthermore, the best-fit
parameters presented in Tinker (2021) should not be too far from the optimal
ones, given the small difference between these two data sets.

Figure 12:  Similar to Fig. 3, but the CCFs are from groups identified with
the Tinker2020 group finder.

Comparisons of CLF, CCF, and CCMD between the CCMD groups and SDSS groups from
the Tinker2020 group finder are shown in Fig. 11, Fig. 12, and Fig. 13,
respectively. Overall, the trends seen in the results are similar to those in
Fig. 2, Fig. 3, and Fig. 4, based on the Yang et al. group finder. This again
suggests that the CCMD in Xu18 provides a good description of the galaxy-halo
relation in terms of galaxy colour/luminosity and halo mass. However, in
detail, the group-based CLF, CCF, and CCMD depend on the group finder. For
example, the Tinker2020 group finder almost eliminates double-peak features in
the CLF of the CCMD mocks, while the $\tt Yang\leavevmode\nobreak\
et\leavevmode\nobreak\ al.$ group finder would create an artificial peak
feature, especially when single-member systems at relatively higher redshift
are included (Fig. 10). In massive groups identified by the Tinker2020 group
finder, blue central galaxies are removed.

Comparing the group galaxy statistics from different group finders and their
connection to the ground truth of galaxies in haloes, based on CCMD mocks can
reveal common trends and interesting differences, which will be further
explored in a separate work.

Figure 13:  Similar to Fig. 4, but the CCMDs are from groups identified with
the Tinker2020 group finder.