zcolors {ztoolbox}R Documentation

Convenient selection of colors based on HCL color space

Description

Provides a wrapper for simple selection of colors for typical meteorological parameters.

Usage

zcolors(n, parameter = c("std","rain","snow","temperature","terrain"), 
  type=c("qualitative","sequential","diverge","warm","cold"), plot = FALSE, ...)
  
show_palettes(n = 10, parameter = c("std","rain","snow","temperature","terrain"), 
  type = c("qualitative","sequential","diverge","warm","cold"))  
 

Arguments

n

number of colors.

parameter

one of std, rain, snow, temperature, terrain. The default is std.

type

type of color palette. One of sequential, diverge, qualitative, warm or cold. The default is qualitative (see details).

plot

Shall an image be plotted? Can be TRUE or FALSE, which is the default.

...

Other parameters that are transferred to the HCL routines (see details).

Details

Colors are provided based on the HCL color space, which is used as reference. See package colorspace. Function show_palettes shows an overview of currently available colorsets.

Value

A character string with HEX representation of the n colors. If plot = TRUE an image with the chosen colorset is shown. Function show_palettes only produces an overview image.

Examples


zcolors(8,plot=TRUE)
zcolors(15,parameter="terrain",type="sequential",h2=60,plot=TRUE)
show_palettes(12)


[Package ztoolbox version 1.0-0 Index]