create_palette: Create a color palette

Description Usage Arguments Details Value Examples

View source: R/create_palette.R

Description

Uses colortools package (and possibly scales) to easily create a color palette based on a initial input color.

Usage

1
create_palette(colorhex, name = NULL, toHCL = FALSE, plot = FALSE, alpha = 1)

Arguments

colorhex

Hexadecimal value of color or an R color name.

name

optional name of color

toHCL

Convert colors to hcl. Defaults to FALSE.

plot

Plot the results. Defaults to FALSE.

alpha

Transparency. Takes values from 0 to 1. Default is 1.

Details

Will return complementary, analogous/adjacent, split complementary, triadic, square and tetradic color values relative to the initial color. Note that if you want sequential, qualitative, diverging etc., other packages like RColorBrewer, colorspace, and colortools will do that for you.

Value

A list of colors

Examples

1
2
3
library(visibly)
create_palette(colorhex = '#ff5500', name='orange')
create_palette(colorhex = '#ff5500', name='orange', alpha=.5)

m-clark/visibly documentation built on Oct. 28, 2020, 5:33 p.m.