  In this paper, we examine the role that the colour-magnitude relation (CMR)
can play in constraining the formation history of rich cluster galaxies.
  Firstly, we consider the colour evolution of galaxies after star formation
ceases. We show that the scatter of the CMR places a strong constraint on the
spread in age of the bulk of the stellar population. However, although the bulk
of stars must be formed in a short period, continuing formation of stars in a
fraction of the galaxies is not so strongly constrained.
  We examine a model in which star formation occurs over an extended period of
time in most galaxies. An extension of this type of star formation history
allows us to reconcile the small present-day scatter of the CMR with the
observed blue galaxy fractions of intermediate redshift galaxy clusters.
  Secondly, the CMR can also be used to constrain the degree of merging between
pre-existing stellar systems. This test relies on the slope of the CMR. We show
that random mergers between galaxies very rapidly remove any well-defined CMR.
However, we prefer to examine the merger process using a self-consistent merger
tree. In such a model there are two effects: massive galaxies preferentially
merge with systems of similar mass; and the rate of mass growth is considerably
smaller than for the random merger case. As a result of both of these effects,
the CMR persists through a larger number of merger steps. The passive evolution
of galaxy colours and their averaging in dissipationless mergers provide
opposing constraints on the formation of cluster galaxies in a hierarchical
model; but at the level of current constraints, a compromise solution appears
possible.
