excel_new_pal: Excel (current versions) color palettes (discrete)

View source: R/excel.R

excel_new_palR Documentation

Excel (current versions) color palettes (discrete)

Description

Color palettes used by current versions of Microsoft Office and Excel.

Usage

excel_new_pal(theme = "Office")

Arguments

theme

The name of the Office theme or color theme (not to be confused with ggplot2 themes) from which to derive the color palette. Available themes include: \Sexpr[results=rd]{ggthemes:::rd_optlist(names(ggthemes::ggthemes_data$excel$themes))}

Details

In 2023 Microsoft replaced the long-standing Office theme with a new default and renamed the old one. The default here, "Office", is the current palette; "Office 2013" is the palette Excel used from 2013 until 2022. The former ggthemes names "Office Theme" and "Office 2007-2010" still work, and select "Office 2013" and "Office 2007" respectively.

Value

A palette function. It takes the number of colours n and returns a character vector of n hex colours, and can be used as the palette argument of discrete_scale().

See Also

Other colour excel: excel_pal(), scale_colour_excel_new(), scale_fill_excel()

Examples

library("scales")

for (i in names(ggthemes::ggthemes_data$excel$themes)) {
  show_col(excel_new_pal(theme = i)(6))
}

ggthemes documentation built on Oct. 4, 2026, 1:06 a.m.