colorspace (version 2.1-0)

readRGB: Read RGB Color Descriptions

Description

This function reads a set of RGB color descriptions (of the form written by gcolorsel) from a file and creates a color object containing the corresponding colors.

Usage

readRGB(file, class = "RGB")

Value

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

Arguments

file

The file containing the color descriptions.

class

The kind of color object to be returned.

Author

Ross Ihaka

Details

The file is assumed to contain RGB color descriptions consisting of three integer values in the range from 0 to 255 followed by a color name.

See Also

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

Examples

Run this code
if (FALSE) {
rgb <- readRGB("pastel.rgb")
hsv <- readRGB("pastel.rgb", "HSV")
}

Run the code above in your browser using DataLab