nudz_palette: Creates palette to be used in scales or elsewhere

Description Usage Arguments Value

View source: R/palettes.R

Description

Creates palette to be used in scales or elsewhere

Usage

1
2
3
4
5
6
7
nudz_palette(
  palette = "main",
  reversed = FALSE,
  n_colors = c(),
  discrete = TRUE,
  ...
)

Arguments

palette

name of the palette to interpolate.

  • main Main red blue and dark blue palette

  • grey_and_blue Combination of grey and blue colors Defaults to "main"

reversed

logical determining if the order of the colors should be reversed

n_colors

either how many colors from the palette to interpolate or indices of colors which to interpolate from the palette. If a single number (n) then colors 1...n will be selected. If multiple numbers are passed then the colors at given indices are selected. if empty, all colors are used in defining the palette. Defaults to empty.

discrete

should the palette be only discrete values

...

optional parameters passed to colorRampPalette if discrete is set to FALSE

Value

vector of hex colors if discrete is TRUE and colorRamp object if FALSE. Prepares the color interpolation object to be used in construction of your own


NUDZ/nudz.styles documentation built on Feb. 6, 2021, 12:24 a.m.