color_mix: Create an alternating sequence of graded colors

View source: R/utils_color.R

color_mixR Documentation

Create an alternating sequence of graded colors

Description

Create an alternating sequence of graded colors

Usage

color_mix(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.

Value

Character vector of color hex codes.

Author(s)

EDG

Examples

## Not run: 
color <- list(
  blue = c("#82afd3", "#000f3a"),
  gray = c("gray10", "gray85")
)
previewcolor(desaturate(color_mix(color, 6), .3))

color <- list(
  blue = c("#82afd3", "#57000a"),
  gray = c("gray10", "gray85")
)
previewcolor(desaturate(color_mix(color, 6), .3))

color <- list(
  blue = c("#82afd3", "#000f3a"),
  purple = c("#23001f", "#c480c1")
)
previewcolor(desaturate(color_mix(color, 5), .3))

## End(Not run)

egenn/rtemis documentation built on June 14, 2025, 11:54 p.m.