lessR (version 2.5)

showColors: Display All Named R Colors and Their rgb Values

Description

For each specified color, displays the color, the name and the associated rgb definition.

Usage

showColors(file="colors.pdf", color=NULL)

Arguments

file
Name of pdf file that contains the list of colors with a default of colors.pdf.
color
NULL for all colors, otherwise specify a color and all colors which include that color as part of their name are displayed.

Details

Every color name is defined in terms of a red, a green and a blue component. This function lists the rgb definitions for the specified colors, as well as the name and a display of each color. The output should be routed to an external pdf file for storage. The directory and file name of the output file are displayed.

Examples

Run this code
# all colors
#showColors()

# all colors with 'blue' in their name
#showColors(file="theblues.pdf", color="blue")

Run the code above in your browser using DataLab