R/utils_color.R
color_fade.Rd
Fade color towards target
color_fade(x, to = "#000000", pct = 0.5)
Color source
Target color
Numeric (0, 1) fraction of the distance in RGBA space between x and to to move. e.g. .5 gets the mean RGBA value of the two
x
to
Color in hex notation
EDG
previewcolor(c("red", color_fade("red", "blue", .5), "blue"))