Return a sequential, diverging, or qualitative palette/ramp of NN colors

nn_color_ramp(
  num_colors = 5,
  type = "seq",
  palette_name = "Blue",
  direction = 1
)

Arguments

num_colors

Number of colors you would like, within the bounds of # of colors available

type

One of seq (sequential), div (diverging) or qual (qualitative)

palette_name

String indicating the name of the palette (not case-sensitive)

direction

Sets the order of colors in the scale. If 1, colors are ordered in the default order. If -1, the order of colors is reversed.

Value

Character vector of hex codes corresponding to queried colors

Examples

nn_color_ramp(num_colors = 5, type = "seq", palette_name = "Blue", direction=1)
#> [1] "#F4F8FA" "#6CABC6" "#006D9D" "#003851" "#000E14"