Learn R Programming

palettetown (version 0.1.1)

pokepal: Get a pokemon palette.

Description

Get a pokemon (R) palette by either giving a pokemon number or name.

Usage

pokepal(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, using only hue and downweighted saturation). 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.

A few pokemon have odd names. Argument pokemon ignores letter case. Female and Male Nidoran are named NidoranF and NidoranM respectively. Mr. Mime should be either 'Mr. Mime' or 'mr. mime'. The full stop and space are needed.

See Also

ichooseyou

Examples

Run this code
pal <- pokepal(3)
plot(1:length(pal), col = pal)

Run the code above in your browser using DataLab