Let's say I have the RGB values like this (in R, for example):
cols <- c("#CDE4F3","#E7F3D3","#F7F0C7","#EFCFE5","#D0D1E7")
Is there any way to programmatically derive another set of colors which is a darkened version of the former?
It doesn't have to be R.
Yes there is.
You will have to specify how darken or lighter you what to go.
Here is a Function done in JavaScript: https://css-tricks.com/snippets/javascript/lighten-darken-color/
Hope it helps, Cheers.