  Cosmology and galaxy evolution studies with LSST, \Euclid, and {\it Roman},
will require accurate redshifts for the detected galaxies. In this study, we
present improved photometric redshift estimates for galaxies using a template
library that populates three-color space and is constrained by \HST/CANDELS
photometry. For the training sample, we use a sample of galaxies having
photometric redshifts which allows us to train on a large, unbiased galaxy
sample having deep, unconfused photometry at optical-to-mid infrared
wavelengths. Galaxies in the training sample are assigned to cubes in
three-dimensional color space, $V-H$, $I-J$, and $z-H$. We then derive the
best-fit spectral energy distributions of the training sample at the fixed
CANDELS median photometric redshifts to construct the new template library for
each individual color cube (i.e. color-cube-based template library). We derive
photometric redshifts (photo-z) of our target galaxies using our new
color-cube-based template library and with photometry in only a limited set of
bands, as expected for the aforementioned surveys. As a result, our method
yields $\sigma_{NMAD}$ of 0.026 and an outlier fraction of 6\% using only
photometry in the LSST and \Euclid/{\it Roman} bands. This is an improvement of
$\sim$10\% on $\sigma_{NMAD}$ and a reduction in outlier fraction of $\sim$13\%
compared to other techniques. In particular, we improve the photo-z precision
by about 30\% at $2 < z < 3$. We also assess photo-z improvements by including
$K$ or mid-infrared bands to the $ugrizYJH$ photometry. Our color-cube-based
template library is a powerful tool to constrain photometric redshifts for
future large surveys.
