% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spec_tools.R
\name{spec_color}
\alias{spec_color}
\title{Generate viridis Color code for continuous values}
\usage{
spec_color(
  x,
  alpha = 1,
  begin = 0,
  end = 1,
  direction = 1,
  option = "D",
  na_color = "#BBBBBB",
  scale_from = NULL
)
}
\arguments{
\item{x}{continuous vectors of values}

\item{alpha}{The alpha transparency, a number in [0,1], see argument alpha in
\code{\link[grDevices]{hsv}}.}

\item{begin}{The (corrected) hue in [0,1] at which the viridis colormap begins.}

\item{end}{The (corrected) hue in [0,1] at which the viridis colormap ends.}

\item{direction}{Sets the order of colors in the scale. If 1, the default, colors
are ordered from darkest to lightest. If -1, the order of colors is reversed.}

\item{option}{A character string indicating the colormap option to use. Four
options are available: "magma" (or "A"), "inferno" (or "B"), "plasma" (or "C"),
"viridis" (or "D", the default option) and "cividis" (or "E").}

\item{na_color}{color code for NA values}

\item{scale_from}{input range (vector of length two). If not given,
is calculated from the range of x}
}
\description{
Generate viridis Color code for continuous values
}
