Learn R Programming

colouR (version 0.1.1)

colPalette: colPalette

Description

Create a Color Palette. This function generates a custom color palette based on the specified 'palette' name. The color palettes are sourced from two predefined lists: 'taylor_palettes' and 'radiohead_palettes'.

Usage

colPalette(palette)

Value

A colorRampPalette function with the specified colour palette.

Arguments

palette

A character string specifying the name of the colour palette. The palette must be present in either 'taylor_palettes' or 'radiohead_palettes'.

Examples

Run this code
my_palette <- colPalette(palette = "evermore")
colours <- my_palette(5)
print(colors)

Run the code above in your browser using DataLab