| writehex | R Documentation |
Given a color object, this function writes a file containing the hexadecimal representation of the colors in the object.
writehex(x, file = "")
x |
a color object. |
file |
the name of the file to be written. |
This function converts the given color object to RGB and then writes
hexadecimal strings (of the form #RRGGBB) representing the colors to
the specified file.
The name of the file is returned as the value of the function.
Ross Ihaka
readhex, readRGB,
hex2RGB, RGB, HSV,
XYZ, LAB, polarLAB,
LUV, polarLUV.
set.seed(1)
x <- sRGB(runif(10), runif(10), runif(10))
## IGNORE_RDIFF_BEGIN
writehex(x, file.path(tempdir(), "random.txt"))
## IGNORE_RDIFF_END
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.