Learn R Programming

rtemis (version 0.79)

colorMix: Create an alternating sequence of graded colors

Description

Create an alternating sequence of graded colors

Usage

colorMix(color, n = 4)

Arguments

color

List: List of two or more elements, each containing two colors. A gradient will be created from the first to the second color of each element

n

Integer: Number of steps in each gradient. Default = 4

Examples

Run this code
# NOT RUN {
color <- list(blue = c(pennCol$lightestBlue, pennCol$darkestBlue),
              gray = c("gray10", "gray85"))
colorPreview(desaturate(colorMix(color, 6), .3))

color <- list(blue = c(pennCol$lightestBlue, pennCol$darkestRed),
              gray = c("gray10", "gray85"))
colorPreview(desaturate(colorMix(color, 6), .3))

color <- list(blue = c(pennCol$lightestBlue, pennCol$darkestBlue),
              purple = c(pennCol$darkestPurple, pennCol$lightestPurple))
colorPreview(desaturate(colorMix(color, 5), .3))
# }

Run the code above in your browser using DataLab