Learn R Programming

roots (version 1.0)

colGrad: Generates a smooth colour gradient

Description

Generates a smooth colour gradient

Usage

colGrad(x, darken = 1)

Arguments

x

Number of colours required

darken

Multiplication factor. Must be less than 1. Smaller the darker.

Value

Returns vector of RGB colours

Details

Generates a smooth colour gradient Goes from red to red/green to green to green/blue to blue to blu/red

Examples

Run this code
# NOT RUN {
gradientColors <- colGrad(10)
# }

Run the code above in your browser using DataLab