writehex: Write Hexadecimal Color Descriptions

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/colorspace.R

Description

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

Usage

1
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

1
2
3
set.seed(1)
x <- RGB(runif(10), runif(10), runif(10))
writehex(x, "random.txt")


colorspace documentation built on May 19, 2017, 7:02 p.m.
Search within the colorspace package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.