ClimPalette: Generate Climate Color Palettes

View source: R/ClimPalette.R

ClimPaletteR Documentation

Generate Climate Color Palettes

Description

Generates a colorblind friendly color palette with color ranges useful in climate temperature variable plotting.

Usage

ClimPalette(palette = "bluered")

ClimColors(n, palette = "bluered")

Arguments

palette

A character string of palette. The current choices:

  • 'bluered': from blue through white to red.

  • 'redblue': from red through white to blue.

  • 'yellowred': from yellow through orange to red.

  • 'redyellow': from red through orange to yellow.

  • 'purpleorange': from purple through white to orange.

  • 'orangepurple': from orange through white to purple.

n

A number indicating how many colors to generate.

Value

ClimPalette() returns the function that generates the color palette and the attribute 'na_color'.
ClimColors() returns a vector of the colors.

Examples

lims <- seq(-1, 1, length.out = 21)
cb <- ColorBarContinuous(lims, color_fun = ClimPalette('redyellow'), plot = FALSE)

cols <- ClimColors(20)
cb <- ColorBarContinuous(lims, cols, plot = FALSE)


esviz documentation built on Feb. 4, 2026, 5:13 p.m.

Related to ClimPalette in esviz...