mix.cols.btw {quickcode} | R Documentation |
Mix or Blend colors between two or more colors
Description
Mix or blend multiple colors between two colors
Usage
mix.cols.btw(colors, max = 20, alpha = 1, preview = FALSE)
Arguments
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 |
Value
color hex for all generated colors
Examples
# 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)
[Package quickcode version 0.9.1 Index]