color_preview: Preview a list of hex colors

Description Usage Arguments Examples

View source: R/color_preview.R

Description

Show a plot of colors. Code adapted from Karthik Ram's wesandersonr package (https://github.com/karthik/wesanderson/blob/master/R/colors.R).

Usage

1

Arguments

x

character vector of colors in hex format

name

string of name to print in the palette; if not given, the function looks for a name attribute in the object

...

does nothing for now

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
color_preview(c("#0074D9", "#2ECC40", "#FFDC00", "#FF4136"))

color_preview(c("#0074D9", "#2ECC40", "#FFDC00", "#FF4136"),
              name = "Some colors")

color_preview(viridisLite::viridis(6, begin = 0.15, end = 0.85,
                                   option = "inferno"))

## End(Not run)

andrewheiss/rath documentation built on Nov. 15, 2019, 11:07 p.m.