make.color.scale: Make Color Scale

Description Usage Arguments Value Examples

View source: R/text.R

Description

Construct 2 color gradient for the function 'wordcloud'.

Usage

1
make.color.scale(aColor, bColor, steps, gradientExp=.5)

Arguments

aColor

The starting color of the gradient

bColor

The ending color of the gradient

steps

The number of elements in the outpus gradient vector

gradientExp

A parameter for controlling the interpolation between the 2 colors. a value of 1 will yield straight linear interpolation between the colors. A value lessthan 0 will cause the gradient to rapidly transition and plateau into the the second color,

Value

A vector of colors (represented by character strings) giving a smooth transition between the 2 input colors.

Examples

1
2
# Make a cyan to red gradient with 10 steps.
make.color.scale(c(0,1,1), c(1,0,0),10,1)

DeducerText documentation built on May 2, 2019, 5:44 p.m.