Skip to contents

A function to create a diverging color palette using Blue-Red 3 that is reversed and slightly darkened.

Usage

divFillColors(n_colors)

Arguments

n_colors

Required, the number of color hex codes to return.

Value

a character vector hex color codes the length of n_colorsfrom the Blue-Red 3 palette from the package colorspace.

Examples

# Returns the 5 colors in the diverging palette:
divFillColors(n_colors = 5)
#> [1] "#600204" "#B88081" "#DADADA" "#7F8EB8" "#012B67"

# Returns the 7 colors colors in the diverging palette::
divFillColors(n_colors = 7)
#> [1] "#600204" "#A25959" "#CDA2A3" "#DADADA" "#A3ADCB" "#536DA8" "#012B67"