add.alpha: Add transparency to a hex-defined colour

Description Usage Arguments Value Author(s) Examples

Description

Takes a colour defined in hex format as #XXXXXX and adds a two transparency bytes XX based on a number from 0 to 1. Its main use is to make RColorBrewer palettes transparent.

Usage

1
add.alpha(hex.color.list,alpha)

Arguments

hex.color.list

A list of strings defining solid colors in six byte format.

alpha

A value (or list of values) from 0 to 1 specifying transparency.

Value

A list of strings defining transparent colours in eight byte format.

Author(s)

Chris Brunsdon

Examples

1
2
# Make a list of semi-transparent RColorBrewer colours,  based on Brewer's Red palette with 5 shades
add.alpha(brewer.pal(5,'Reds'),0.5)

GISTools documentation built on May 6, 2019, 1:09 a.m.