clcolors {colourlovers}R Documentation

Retrieve color or colors

Description

Retrieve a color or set of colors from the COLOURlovers API.

Usage

clcolors(set = NULL, ..., fmt = "xml")

clcolor(hex, fmt = "xml")

Arguments

set

Optionally, a subset of COLOURlovers colors. Allowed values are “new”, “top”, and “random”.

...

A named list of parameters passed to the API request. Allowed parameters are lover, hueRange, briRange, keywords, keywordExact, orderCol, sortBy, numResults, and resultOffset. Specifying orderCol overrules any argument to set. See details.

fmt

A format for the API response, one of “xml” (the default) or “json”. This has essentially no effect on function behavior. @return A list of class “clcolor”. This should be the same regardless of the value of fmt.

hex

The six-character hexidemical representation of a single color.

Details

Retrieve details about a color our set of colors.

Specifying named arguments to ... allows the user to request a specific response, as follows:

Author(s)

Thomas J. Leeper

References

http://www.colourlovers.com/api/#colors

Examples

## Not run: 
# Get a random color
clcolors('random')

# Get a single color
clcolor('6B4106')

# Plot a single color
clcolor(rgb(0,0,1), fmt = 'json')

## End(Not run)

[Package colourlovers version 0.3.6 Index]