Debian Codegraph @

man/LAB.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/colorspace.R
3 \name{LAB}
4 \alias{LAB}
5 \title{Create LAB Colors}
6 \usage{
7 LAB(L, A, B, names)
8 }
9 \arguments{
10 \item{L, A, B}{these arguments give the L, A and B coordinates of the colors.
11 The values can be provided in separate \code{L}, \code{A} and \code{B}
12 vectors or in a three-column matrix passed as \code{L}.}
13
14 \item{names}{a vector of names for the colors (by default the row names of
15 \code{L} are used).}
16 }
17 \value{
18 An object of class \code{LAB} which inherits from class \code{color}.
19 }
20 \description{
21 This function creates colors of class ``LAB''; a subclass of the virtual
22 \code{\link{color-class}} class.
23 }
24 \details{
25 The \code{L}, \code{A} and \code{B} values give the coordinates of the
26 colors in the CIE \eqn{L^*a^*b^*}{L*a*b*} space. This is a transformation
27 of the 1931 CIE XYZ space which attempts to produce perceptually based axes.
28 Luminance takes values between 0 and 100, and the other coordinates
29 typically take values between -100 and 100, although these values can also
30 be exceeded by highly saturated colors. The \eqn{a} and \eqn{b} coordinates
31 measure positions on green/red and blue/yellow axes.
32 }
33 \examples{
34 ## Show the LAB space
35 set.seed(1)
36 x <- sRGB(runif(1000), runif(1000), runif(1000))
37 y <- as(x, "LAB")
38 head(x)
39 head(y)
40 plot(y)
41 }
42 \seealso{
43 \code{\link{RGB}}, \code{\link{HSV}}, \code{\link{XYZ}},
44 \code{\link{LAB}}, \code{\link{polarLAB}}, \code{\link{LUV}},
45 \code{\link{polarLUV}}.
46 }
47 \author{
48 Ross Ihaka
49 }
50 \keyword{color}