writehex: Write Hexadecimal Color Descriptions

View source: R/colorspace.R

writehexR Documentation

Write Hexadecimal Color Descriptions

Description

Given a color object, this function writes a file containing the hexadecimal representation of the colors in the object.

Usage

writehex(x, file = "")

Arguments

x

a color object.

file

the name of the file to be written.

Details

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.

Value

The name of the file is returned as the value of the function.

Author(s)

Ross Ihaka

See Also

readhex, readRGB, hex2RGB, RGB, HSV, XYZ, LAB, polarLAB, LUV, polarLUV.

Examples

set.seed(1)
x <- sRGB(runif(10), runif(10), runif(10))
## IGNORE_RDIFF_BEGIN
writehex(x, file.path(tempdir(), "random.txt"))
## IGNORE_RDIFF_END

colorspace documentation built on Sept. 11, 2024, 7:05 p.m.