Learn R Programming

palettetown (version 0.1.1)

ichooseyou: Get a pokemon palette. Alias for pokepal.

Description

Get a pokemon palette by either giving a pokemon number or name. The recomended syntax for this function is 'Magikarp' %>% ichooseyou using the pipe operator %>% from the magrittr package. To specify the spread parameter use 'Snorlax' %>% ichooseyou(5)

Usage

ichooseyou(pokemon = 1, spread = NULL)

Arguments

pokemon
An integer or character pokemon name
spread
How many, quite distinct, colours should be returned. See details.

Details

If spread is given an integer, the full palette is clustered into that many groups (ward clustering in HSV space). The most common colour in each cluster is then returned. It is hoped this will give a good balance between reflecting the pokemons colouring while giving relatively distinct colours.

See Also

pokepal

Examples

Run this code
library(magrittr)
pal <- 'Hoothoot' %>% ichooseyou
pal2 <- 'Pichu' %>% ichooseyou(6)

Run the code above in your browser using DataLab