get_col_gradient: Get color gradient

View source: R/colors.R

get_col_gradientR Documentation

Get color gradient

Description

Get color gradient for a colorRampPalette with n number of colors.

Usage

get_col_gradient(colRamp, n = 50)

Arguments

colRamp

colorRampPalette functions object containing colors for palette. Use function get_col_palette() to create.

n

numeric. Number of colors in gradient

Details

x <- LETTERS1:6

Value

A character vector, names of colors (hex).

The three lines of code below are equivalent

get_col_gradient(get_col_palette("RdBu"), 100) get_col_palette("RdBu")(100) colorRampPalette(RColorBrewer::brewer.pal(9, "RdBu"))(100)


kazeera/hourglass documentation built on April 5, 2025, 7:18 a.m.