lucky: Random colour gradient!

Description Usage Arguments Details Value Examples

View source: R/lucky.R

Description

Based on "I'm Feeling Lucky" from Google. As this package includes 7140 colour gradients, it might be hard to find the 'right'

Usage

1
2
lucky(n = 100, colorRampPalette = FALSE, rev = FALSE,
  message = TRUE, nseed)

Arguments

n

integer; number of colors

colorRampPalette

Logical; to be used in sf and mapview.

rev

Logical; to internally revert order of rgb color vectors.

message

Logical; for printing or not the name of the colour gradient

nseed

integer; for reproducing the same colour gradient. See set.seed

Details

The cpt-city web archive comes from: http://soliton.vm.bytemark.co.uk/pub/cpt-city/index.html

Value

A RANDOM colour palette function including name of the colour gradient and number.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
library(cptcity)
image(matrix(1:100), col = lucky())
image(matrix(1:100), col = lucky())
image(matrix(1:100), col = lucky())
image(matrix(1:100), col = lucky())
image(matrix(1:100), col = lucky())
image(matrix(1:100), col = lucky(rev = TRUE))
image(matrix(1:100), col = lucky(nseed = 1))
}

cptcity documentation built on May 2, 2019, 4:21 a.m.