get_euf_colors: Get EUF colors

View source: R/color_palette_euf.R

get_euf_colorsR Documentation

Get EUF colors

Description

Returns a vector of colors of a chose EUF-color palette.

Usage

get_euf_colors(
  n = 1,
  col_name = NULL,
  palette_used = "main",
  reverse_pal = FALSE,
  ...
)

Arguments

n

The number of different colors requested.

col_name

The name of a color as defined in euf_public_cols. If 'all' returns all EUF colors.

palette_used

The type of palette to be returned. Currently, the following palettes are supported: main, cool, hot, and mixed.

reverse_pal

If TRUE reverses the resulting color scheme.

Details

This function takes one of the palettes defined in euf_public_pal and returns a vector with the requested number of colors. To return all base colors of the EUF color scheme call the function with col_name="all".

Value

A vector of hex codes with colors from palette (if col_name is FALSE), a named vector of hex codes from the colors specified in col_name otherwise.

See Also

euf_public_pal for the function that assembles the colors into consistent palettes and scale_color_euf for the application to ggplot2 objects. See icae_public_pal and scale_color_euf for the ICAE pendants.

Other color scheme functions: coloring, get_icae_colors()

Examples

get_euf_colors(3)

get_euf_colors(2, palette_used = "mixed", reverse_pal = TRUE)

get_euf_colors("lightblue")

get_euf_colors(c("blue", "red"))

get_euf_colors(col_name="all")


graebnerc/icaeDesign documentation built on Feb. 29, 2024, 5:02 p.m.