% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/colors-ramps.R
\name{color_ramp}
\alias{color_ramp}
\alias{make_color_pal}
\alias{ramp_blue}
\alias{ramp_yellow}
\alias{ramp_yelblu}
\alias{ramp_orgblu}
\title{Custom color ramps}
\usage{
make_color_pal(colors, bias = 1)

ramp_blue(output, end = "#FFFFFF")

ramp_yellow(output, end = "#FFFFFF")

ramp_yelblu(output, mid = "#F0F0F0")

ramp_orgblu(output, mid = "#999999")
}
\arguments{
\item{colors}{colors to interpolate; must be a valid argument to
    \code{\link[grDevices]{col2rgb}()}.}

\item{bias}{a positive number.  Higher values give more widely spaced
    colors at the high end.}

\item{output}{Colors to pull from the color ramp. Numbers range from 0-1,
which is a normalized sliding scale of the color ramp.}

\item{end}{The end color that the base color should fade into.}

\item{mid}{For pre-made diverging palettes, the color of the midpoint of the
scale.}
}
\value{
\code{\link[=make_color_pal]{make_color_pal()}} returns a function that accepts a numeric vector
of values between 0 and 1 and returns a character vector of hex color
codes. \code{\link[=ramp_blue]{ramp_blue()}}, \code{\link[=ramp_yellow]{ramp_yellow()}}, \code{\link[=ramp_yelblu]{ramp_yelblu()}}, and \code{\link[=ramp_orgblu]{ramp_orgblu()}}
return a character vector of hex color codes.
}
\description{
These color ramp functions create color scales that can be used for making
ggplot2 plots and gt tables. Color ramps are based on the \link{palette_wjake}
color palette.
}
\details{
\code{\link[=make_color_pal]{make_color_pal()}} can be used to create a color ramp function for any set of
valid colors.

\code{\link[=ramp_blue]{ramp_blue()}}, \code{\link[=ramp_yellow]{ramp_yellow()}}, and \code{\link[=ramp_yelblu]{ramp_yelblu()}} are pre-made color ramps
based on the blue and yellow colors from the \link{palette_wjake} color palette.

\code{\link[=ramp_orgblu]{ramp_orgblu()}} is a pre-made color ramp based on the first two colors from
the \link{palette_okabeito} color palette.
}
\examples{
new_ramp <- make_color_pal(c("red", "grey", "blue"))
new_ramp(seq(0, 1, length.out = 10))

# Pre-made palettes
ramp_blue(seq(0, 1, by = 0.2))
ramp_yellow(seq(0.2, 1, length.out = 5))
}
