make_colors: Make a nice color palette appropriate for plotting functions

Description Usage Arguments Value

Description

Make a nice color palette appropriate for plotting functions

Usage

1
2
make_colors(n = 0, type = c("lines", "regions"), showcolors = FALSE,
  alpha = "FF")

Arguments

n

Number of colors to return. If n is larger than the palette selected, then the colors are recycled.

type

The type of color palette to create. If type = 'lines' (the default), then the palette is a set of colors most appropriate to plot lines on a white background. If type = 'regions' then the palette is a set of pastel colors appropriate to highlight regions on a plot or to make a bar graph (with a preset level of alpha).

showcolors

Logical. Specifies whether to plot a bar chart that shows the colors in the selected palette with their names.

alpha

The colors alpha or transparency for the entire set. Defined as a 2 character hex string to be appended to each color. Ignored when type = "regions". Default is "FF" for no transparency.

Value

Returns a named vector of RGB colors (in hex format). xtsanalytics functions can refer to the names of these colors rather than their index number when the user specifies a given set of colors. See xtsplot for details.


jeanmarcgp/xtsanalytics documentation built on May 19, 2019, 12:38 a.m.