| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/colorspace.R |
| 3 |
\docType{class} |
| 4 |
\name{color-class} |
| 5 |
\alias{color-class} |
| 6 |
\alias{RGB-class} |
| 7 |
\alias{sRGB-class} |
| 8 |
\alias{XYZ-class} |
| 9 |
\alias{HSV-class} |
| 10 |
\alias{HLS-class} |
| 11 |
\alias{LAB-class} |
| 12 |
\alias{LUV-class} |
| 13 |
\alias{polarLAB-class} |
| 14 |
\alias{polarLUV-class} |
| 15 |
\alias{[,color-method} |
| 16 |
\alias{coerce,color,RGB-method} |
| 17 |
\alias{coerce,color,sRGB-method} |
| 18 |
\alias{coerce,color,XYZ-method} |
| 19 |
\alias{coerce,color,LAB-method} |
| 20 |
\alias{coerce,color,polarLAB-method} |
| 21 |
\alias{coerce,color,HSV-method} |
| 22 |
\alias{coerce,color,HLS-method} |
| 23 |
\alias{coerce,color,LUV-method} |
| 24 |
\alias{coerce,color,polarLUV-method} |
| 25 |
\alias{coords,color-method} |
| 26 |
\alias{plot,color-method} |
| 27 |
\alias{show,color-method} |
| 28 |
\title{Class "color"} |
| 29 |
\description{ |
| 30 |
Objects from the class \emph{color} represent colors in a number of color |
| 31 |
spaces. In particular, there are subclasses of color which correspond to |
| 32 |
RGB, HSV, HLS, CIEXYZ, CIELUV, CIELAB and polar versions of the last two |
| 33 |
spaces. |
| 34 |
} |
| 35 |
\section{Objects from the Class}{ |
| 36 |
Objects can be created by calls to the |
| 37 |
functions \code{RGB}, \code{sRGB}, \code{HSV}, \code{HLS}, \code{XYZ}, |
| 38 |
\code{LUV}, \code{LAB}, \code{polarLUV}, and \code{polarLAB}. These are all |
| 39 |
subclasses of the virtual class \emph{color}. |
| 40 |
} |
| 41 |
|
| 42 |
\section{Slots}{ |
| 43 |
\describe{ |
| 44 |
\item{\code{coords}:}{An object of class \code{"matrix"}.} |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
\section{Methods}{ |
| 49 |
\describe{ |
| 50 |
\item{[}{\code{signature(x = "color")}: This method makes it possible to |
| 51 |
take subsets of a vector of colors.} |
| 52 |
\item{coerce}{\code{signature(from = "color", to = "RGB")}: convert |
| 53 |
a color vector to RGB.} |
| 54 |
\item{coerce}{\code{signature(from = "color", to = "sRGB")}: convert |
| 55 |
a color vector to sRGB.} |
| 56 |
\item{coerce}{\code{signature(from = "color", to = "XYZ")}: convert |
| 57 |
a color vector to XYZ.} |
| 58 |
\item{coerce}{\code{signature(from = "color", to = "LAB")}: convert |
| 59 |
a color vector to LAB. } |
| 60 |
\item{coerce}{\code{signature(from = "color", to = "polarLAB")}: convert |
| 61 |
a color vector to polarLAB. } |
| 62 |
\item{coerce}{\code{signature(from = "color", to = "HSV")}: convert |
| 63 |
a color vector to HSV. } |
| 64 |
\item{coerce}{\code{signature(from = "color", to = "HLS")}: convert |
| 65 |
a color vector to HLS. } |
| 66 |
\item{coerce}{\code{signature(from = "color", to = "LUV")}: convert |
| 67 |
a color vector to LUV. } |
| 68 |
\item{coerce}{\code{signature(from = "color", to = "polarLUV")}: convert |
| 69 |
a color vector to polarLUV. } |
| 70 |
\item{coords}{\code{signature(color = "color")}: extract the color |
| 71 |
coordinates from a color vector.} |
| 72 |
\item{plot}{\code{signature(x = "color")}: plot a color vector } |
| 73 |
\item{show}{\code{signature(object = "color")}: show a color vector. } |
| 74 |
} |
| 75 |
} |
| 76 |
|
| 77 |
\examples{ |
| 78 |
x <- sRGB(runif(1000), runif(1000), runif(1000)) |
| 79 |
plot(as(x, "LUV")) |
| 80 |
} |
| 81 |
\seealso{ |
| 82 |
\code{\link{RGB}}, \code{\link{XYZ}}, \code{\link{HSV}}, |
| 83 |
\code{\link{HLS}}, \code{\link{LAB}}, \code{\link{polarLAB}}, |
| 84 |
\code{\link{LUV}}, \code{\link{polarLUV}}, \code{\link{mixcolor}}. |
| 85 |
} |
| 86 |
\author{ |
| 87 |
Ross Ihaka |
| 88 |
} |
| 89 |
\keyword{classes} |