  We extend the chromomagnetic model by further considering the effect of color
interaction. The effective mass parameters between quark pairs ($m_{qq}$ or
$m_{q\bar{q}}$) are introduced to account both the effective quark masses and
the color interaction between the two quarks. Using the experimental masses of
hadrons, the quark pair parameters are determined between the light quark pairs
and the light-heavy quark pairs. Then the parameters of heavy quark pairs
($cc$, $cb$, $bb$) are estimated based on simple quark model assumption. We
calculate all masses of doubly and triply heavy-quark baryons. The newly
discovered doubly charmed baryon $\Xi_{cc}$ fits into the model with an error
of 12 MeV.
