Based on "I'm Feeling Lucky" from Google. As this package includes 7140 colour gradients, it might be hard to find the 'right'
lucky(
n = 100,
colorRampPalette = FALSE,
rev = FALSE,
message = TRUE,
nseed,
frgb = rep(1, 3)
)
integer; number of colors
Logical; to be used in sf and mapview.
Logical; to internally revert order of rgb color vectors.
Logical; for printing or not the name of the colour gradient
integer; for reproducing the same colour gradient.
See set.seed
Numeric; vector of 3 to change internal rgb composition The order is red, green, blue
A RANDOM colour palette function including name of the colour gradient and number.
The cpt-city web archive comes from: http://soliton.vm.bytemark.co.uk/pub/cpt-city/index.html
{
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))
}
#> Colour gradient: ing_general2_ib54, number: 3585
#> Colour gradient: ggr_Purples, number: 3146
#> Colour gradient: gacruxa_osse_osse_09, number: 2883
#> Colour gradient: nd_red_Primary_1, number: 5599
#> Colour gradient: cb_qual_Set3_05, number: 431
#> Colour gradient: occ_2_occ079, number: 6436
#> Colour gradient: es_vintage_es_vintage_34, number: 1896