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

writehex(x, file = "")

## Arguments

x a color object. the name of the file to be written.

## Value

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

## 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.

## See also

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

## Examples

set.seed(1)
x <- RGB(runif(10), runif(10), runif(10))
writehex(x, "random.txt")#> [1] "random.txt"