Learn R Programming

lares (version 4.10.6)

lares_pal: Personal Colours Palette

Description

This function plots a list of colours on a specific palette

Usage

lares_pal(return = "list")

Arguments

return

Character. Get only what you need. Select any of: "all" or "list" (list), "colors" or "colours" (vector), "pal" or "palette" (named vector), "simple" (named vector), "custom" or "personal" (data.frame)

Value

Depending on the return input, we get a:

  • vector with palette results vector

  • vector with palette results vector's names

  • list with palette results vector, labels results data.frame, and simple results named vector

See Also

Other Auxiliary: gg_colour_customs(), gg_fill_customs(), gg_text_customs(), plot_palette()

Examples

Run this code
# NOT RUN {
# Simple colour-named palette
lares_pal("simple")

# Raw colours and counter-colours
# OR simply: lares_pal("palette")
nice_palette <- lares_pal("colours")
nice_palette_ctr <- as.vector(lares_pal()$palette)
lapply(list(nice_palette, nice_palette_ctr), head)

# Personal colours by name
df <- lares_pal("custom")
df[sample(nrow(df), 5), ]
# }

Run the code above in your browser using DataLab