readhex: Read Hexadecimal Color Descriptions

View source: R/colorspace.R

readhexR Documentation

Read Hexadecimal Color Descriptions

Description

This function reads a set of hexadecimal color descriptions from a file and creates a color object containing the corresponding colors.

Usage

readhex(file = "", class = "RGB")

Arguments

file

The file containing the color descriptions.

class

The kind of color object to be returned.

Details

The file is assumed to contain hexadecimal color descriptions of the form #RRGGBB.

Value

An color object of the specified class containing the color descriptions.

Author(s)

Ross Ihaka

See Also

writehex, readRGB, hex2RGB, RGB, HSV, XYZ, LAB, polarLAB, LUV, polarLUV,

Examples

## Not run: 
rgb <- readhex("pastel.txt")
hsv <- readhex("pastel.txt", "HSV")

## End(Not run)

colorspace documentation built on March 18, 2022, 5:21 p.m.