scale_colorPalette: Re-scale Color Palettes Function

View source: R/Scale_colorPalette.R

scale_colorPaletteR Documentation

Re-scale Color Palettes Function

Description

This function is a wrapper of color interpolation colorRampPalette, which takes an color palettes function and re-scale palettes in square root, 4th root and log scales.

Usage

scale_colorPalette(col_fun = jet.colors, scale = "2nd")

Arguments

col_fun

A Color Palettes function

scale

A character string of "2nd", "4th" and "log" to rescale the color palettes indicated by col_fun

Value

returns a function that takes an integer argument (the required number of colors) and returns a character vector of colors (see rgb) interpolating the given sequence (similar to heat.colors or terrain.colors.

Author(s)

Chih-Lin Wei <chihlinwei@gmail.com>

Examples

log.colors <- scale_colorPalette(heat.colors, "log")

chihlinwei/SCC85 documentation built on Sept. 15, 2023, 4:47 a.m.