% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gg.color.spec.R
\name{gg.color.spec}
\alias{gg.color.spec}
\title{Generate a Color Palette for ggplot Visualizations}
\usage{
gg.color.spec(n = 11, background = FALSE)
}
\arguments{
\item{n}{An integer specifying the number of colors to generate. Default is 11.}

\item{background}{A logical value indicating whether to include a background color
(\code{'#D9DDDC'}) as the first element of the palette. Default is \code{FALSE}.}
}
\value{
A character vector of hexadecimal color codes. If \code{background = TRUE},
the first color is a light grey background color (\code{'#D9DDDC'}), followed by
a reversed Spectral color palette.
}
\description{
This function creates a reversed Spectral color palette from the \pkg{RColorBrewer} package
for use in ggplot or other visualizations. Optionally, a background color can be added.
}
\details{
The function generates a reversed Spectral palette using the \code{RColorBrewer::brewer.pal}
function. The palette can be customized by specifying the number of colors (\code{n})
and optionally including a background color.
}
\examples{
# Default palette with 11 colors, no background color
gg.color.spec()

# Palette with 7 colors, including a background color
gg.color.spec(n = 7, background = TRUE)

}
