xlPalettes: Colour Palettes

Description Usage Arguments Details References Examples

Description

These functions return hexadecimal colours from the various colour palettes I have collected over time from places including companies I have worked for.

Usage

1
2
3
xlColPal(cols = NULL, palette = "wipro", alpha = 1)

xlColPalDisp(cols = NULL, palette = "wipro", ...)

Arguments

cols

character or numeric vector for the names or the indices of colours in the palette specified by palette.

palette

a string, the colour palette name.

alpha

a number between [0, 1] for the opacity, 1 being completely opaque.

...

parameters passed to either rgb for xlColPal, or img for xlColPalDisp.

Details

To do: how to use.

Currently the available palettes are as follow:

References

Wipro colours are taken from the internal template

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
xlColPal()
xlColPal(c(1, 2, 3))
xlColPal(c('red', 'cyan', 'grey'))
xlColPal(rep(c(1, 2), 3)) # repeats are allowed
xlColPalDisp()
xlColPalDisp(c(1, 2, 3), 'ee')

## Not run: 
# What not to do:
xlColPal(c(1, 2, 3), palette = 'wrong') # error, wrong palette name
xlColPal(c(356, 6))                     # error, as 356 is outside of 1:10
xlColPal(c(1, 'cyan', 'grey'))          # error, mixed cols element types
xlColPal(c('1'))                        # error, numeric should not be quoted

## End(Not run)

xinye1/xltools documentation built on Dec. 2, 2020, 7:23 p.m.