Debian Codegraph @

man/hex2RGB.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/colorspace.R
3 \name{hex2RGB}
4 \alias{hex2RGB}
5 \title{Convert Hexadecimal Color Specifications to sRGB Objects}
6 \usage{
7 hex2RGB(x, gamma = FALSE)
8 }
9 \arguments{
10 \item{x}{a vector of hexadecimal color descriptions.}
11
12 \item{gamma}{Whether to apply gamma-correction.}
13 }
14 \value{
15 An sRGB object describing the colors.
16 }
17 \description{
18 This function takes a vector of strings of the form \code{"#RRGGBB"}
19 (hexadecimal color descriptions) into \code{\link{sRGB}} objects.
20 }
21 \details{
22 This function converts device-dependent color descriptions of the form
23 \code{"#RRGGBB"} into sRGB color descriptions (linearized if \code{gamma} is
24 \code{TRUE}). The alpha channel will be ignored if given
25 (\code{"#RRGGBBAA"}).
26 }
27 \examples{
28 hex2RGB(c("#FF0000","#00FF00", "#0000FF50"))
29 }
30 \seealso{
31 \code{\link{hex}}, \code{\link{RGB}}, \code{\link{sRGB}},
32 \code{\link{HSV}}, \code{\link{XYZ}}, \code{\link{polarLAB}},
33 \code{\link{LUV}}, \code{\link{polarLUV}}.
34 }
35 \author{
36 Ross Ihaka
37 }
38 \keyword{color}