You could try the ggnewscale package, which allows you to set more than one scale for a given aesthetic. In this case, we'll set two different color scales. In the code below, note that we set the colors of the individual lines to have a luminance of 80 and the colors of the smooths to have a luminance of 50 (of course you can play around with the settings to get the exact colors you desire). For illustration, I've used the data frame created by FJCC:
#devtools::install_github("eliocamp/ggnewscale")
library(ggplot2)
library(ggnewscale)
x <- seq(-4, 12, 0.5)
ybase1 = c(rep(8, 8), rep(6, 25))
ybase2 = c(rep(7, 8), rep(5.5, 25))
set.seed(25234)
DF <- data.frame(X = rep(x, 20), Y = c(rep(ybase1, 10) + runif(330, -2, 2),
rep(ybase2, 10) + runif(330, -2, 2)),
Group = rep(c("A","B"), each = 330),
subgroup = (rep(1:20, each = 33)))
ggplot(DF, aes(X, Y, group = subgroup, color = Group)) +
geom_line() +
scale_color_manual(values=hcl(c(15,195), 100, 80)) +
new_scale_colour() +
geom_smooth(aes(group = Group, colour=Group), se = FALSE) +
scale_color_manual(values=hcl(c(15,195), 100, 50))
