readRGB: Read RGB Color Descriptions

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

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

1
readRGB(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 RGB color descriptions consisting of three integer values in the range from 0 to 255 followed by a color name.

Value

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

Author(s)

Ross Ihaka.

See Also

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

Examples

1
2
3
4
5
## Not run: 
rgb <- readRGB("pastel.rgb")
hsv <- readRGB("pastel.rgb", "HSV")

## End(Not run)


Search within the colorspace package
Search all R packages, documentation and source code

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

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

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