color_palettes: Some color palettes

Description Usage Arguments Value Note Examples

Description

Colors, colors, colors.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

Arguments

n

the number of colors to generate from the color palette

Value

colors (hexadecimal format)

Note

Among available color palettes, col_solarized is based on Solarized: http://ethanschoonover.com/solarized; col_div, col_qual, col_heat, col_cold and col_gallus are based on on ColorBrewer2: http://colorbrewer2.org/.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
wheel <- function(palette, n=10){
 op <- par(mar=rep(0, 4)) ; on.exit(par(op))
 pie(rep(1, n), col=palette(n), labels=NA, clockwise=TRUE)}

 # Qualitative
 wheel(col_qual)
 wheel(col_solarized)
 wheel(col_summer)
 wheel(col_summer2)
 wheel(col_spring)
 wheel(col_autumn)

 # Divergent
 wheel(col_gallus)
 wheel(col_india)

 # Sequential
 wheel(col_heat)
 wheel(col_hot)
 wheel(col_cold)
 wheel(col_sari)
 wheel(col_bw)
 wheel(col_grey)

 # Black only for pubs
 wheel(col_black)

Momocs documentation built on Sept. 28, 2017, 9:04 a.m.