The question asks if there is a way to programmatically darken the colors. The problem is that there are many different ways, and they all give different results. The specific result you get depends on the particular algorithm used and the color space used.
The R colorspace now provides a built-in function to darken colors using the darken() function. This feature uses the new “combined” color space we have encountered, a combination between HLS and HCL. (In short, configures L in the HCL space, but tunes C by taking a traversal through HLS, keeping constant H).
To use this function, you need to install the current version of the color space:
install.packages("colorspace", repos = "http://R-Forge.R-project.org")
Then try the following:
# original colors cols <- c("#CDE4F3", "#E7F3D3", "#F7F0C7", "#EFCFE5", "#D0D1E7") # darken 20% cols_d2 <- darken(cols, 0.2) # darken 40% cols_d4 <- darken(cols, 0.4) # plot pal <- function(col, border = "light gray") { n <- length(col) plot(0, 0, type="n", xlim = c(0, 1), ylim = c(0, 1), axes = FALSE, xlab = "", ylab = "") rect(0:(n-1)/n, 0, 1:n/n, 1, col = col, border = border) } par(mfrow = c(3, 1), mar = c(1, 0, 2, 0)) pal(cols); mtext("original") pal(cols_d2); mtext("20% darker") pal(cols_d4); mtext("40% darker")

There are several different color spaces and other settings that you can try, but by default this should work in most cases.
To see the effect of darkening in different color spaces, think about what happens when we darken the same colors in HCL or HLS:

The darkened HCL colors appear rather gray, and the darkened HLS colors appear too bright and colorful. However, depending on your specific application, you may need one of these results.