colorRampPalette(c("#3794bf", "#FFFFFF", "#df8640"))(5)
# [1] "#3794BF" "#9BC9DF" "#FFFFFF" "#EFC29F" "#DF8640"
# Note that the mid color is the mid value...
# install.packages("Polychrome")
library(Polychrome)
# create your own color palette based on `seedcolors`
P36 = createPalette(36, c("#ff0000", "#00ff00", "#0000ff"))
swatch(P36)