Skip to contents

This function returns the divergent colors for a given n.

Usage

mnb_divergent_colors(n, rev = FALSE)

Arguments

n

Number of colors

rev

Logical. If TRUE, reverses the order of the colors. Default is FALSE.

Value

A vector of colors

Examples

library(ggplot2)
scales::show_col(mnb_divergent_colors(4))