Learn R Programming

colorspace (version 0.9)

writehex: 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 oject 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.[object Object]readhex, readRGB, hex2RGB, RGB, HSV, XYZ, LAB, polarLAB, LUV, polarLUV.

x = RGB(runif(10), runif(10), runif(10)) writehex(x, "random.txt") color