View source: R/color_compHist.R
mix.cols.btw | R Documentation |
Mix or blend multiple colors between two colors
mix.cols.btw(colors, max = 20, alpha = 1, preview = FALSE)
colors |
the vector of two colors |
max |
maximum number of colors to blend between |
alpha |
alpha for the new color blends |
preview |
LOGICAL. preview all color generated |
color hex for all generated colors
# simply mix/blend two colors
mix.cols.btw(c("red","brown"))
# simply mix/blend two colors, maximum number of colors at the end
mix.cols.btw(c("red","brown"), max = 8)
# simply mix/blend two colors with alpha=0.2 (opacity=0.2)
mix.cols.btw(c("yellow","green"),alpha = 0.2)
# also preview after mixing the two colors
mix.cols.btw(c("red","green"), preview = TRUE)
mix.cols.btw(c("blue","violet"),alpha = 0.2, preview = TRUE)
mix.cols.btw(c("red","purple","yellow","gray"), preview = TRUE)
mix.cols.btw(c("red","purple","yellow","gray"),alpha = 0.2, preview = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.