Learn R Programming

legocolors (version 0.4.0)

lc_palettes: Predefined palettes and palette generators

Description

These functions are analogs to familiar R color palettes but based on Lego colors.

Usage

lc_terrain(n)

lc_topo(n)

lc_heat(n)

Value

character vector of hex colors

Arguments

n

if not provided, return the vector of official Lego colors defining the palette. If provided, return an interpolated palette, which will contain non-Lego colors only if n is greater than the palette definition.

Examples

Run this code
lc_terrain()
lc_terrain(4)

lc_topo()
lc_heat()

Run the code above in your browser using DataLab