% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_data.R
\name{generate_palette}
\alias{generate_palette}
\title{Generate a Color Palette}
\usage{
generate_palette(n, palette)
}
\arguments{
\item{n}{Integer. Number of colors to generate.}

\item{palette}{Character. Name of the palette. Supported values:
\code{"rainbow"}, \code{"heat"}, \code{"terrain"}, \code{"topo"}, \code{"cm"},
\code{"viridis"}, \code{"plasma"}, \code{"inferno"}, \code{"magma"}, \code{"cividis"},
\code{"green"}, \code{"red"}, \code{"purple"}, \code{"orange"}, \code{"yellow"}, \code{"brown"},
\code{"diverging1"}, \code{"diverging2"}, \code{"diverging3"}, \code{"diverging4"}.}
}
\value{
Character vector of color hex codes.
}
\description{
Returns a vector of colors based on a specified palette name. Supports
built-in R palettes, \code{RColorBrewer} palettes, \code{viridis} palettes, and
custom diverging palettes.
}
\examples{
# Generate 5 colors from rainbow palette
generate_palette(5, "rainbow")

# Generate 10 colors from viridis palette
generate_palette(10, "viridis")
}
