| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/colorspace.R |
| 3 |
\name{writehex} |
| 4 |
\alias{writehex} |
| 5 |
\title{Write Hexadecimal Color Descriptions} |
| 6 |
\usage{ |
| 7 |
writehex(x, file = "") |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{x}{a color object.} |
| 11 |
|
| 12 |
\item{file}{the name of the file to be written.} |
| 13 |
} |
| 14 |
\value{ |
| 15 |
The name of the file is returned as the value of the function. |
| 16 |
} |
| 17 |
\description{ |
| 18 |
Given a color object, this function writes a file containing the hexadecimal |
| 19 |
representation of the colors in the object. |
| 20 |
} |
| 21 |
\details{ |
| 22 |
This function converts the given color object to RGB and then writes |
| 23 |
hexadecimal strings (of the form \code{#RRGGBB}) representing the colors to |
| 24 |
the specified file. |
| 25 |
} |
| 26 |
\examples{ |
| 27 |
set.seed(1) |
| 28 |
x <- sRGB(runif(10), runif(10), runif(10)) |
| 29 |
## IGNORE_RDIFF_BEGIN |
| 30 |
writehex(x, file.path(tempdir(), "random.txt")) |
| 31 |
## IGNORE_RDIFF_END |
| 32 |
} |
| 33 |
\seealso{ |
| 34 |
\code{\link{readhex}}, \code{\link{readRGB}}, |
| 35 |
\code{\link{hex2RGB}}, \code{\link{RGB}}, \code{\link{HSV}}, |
| 36 |
\code{\link{XYZ}}, \code{\link{LAB}}, \code{\link{polarLAB}}, |
| 37 |
\code{\link{LUV}}, \code{\link{polarLUV}}. |
| 38 |
} |
| 39 |
\author{ |
| 40 |
Ross Ihaka |
| 41 |
} |
| 42 |
\keyword{color} |