Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

vmd_colors

VMD Color Palette


Description

This function creates a character vector of the colors used by the VMD molecular graphics program.

Usage

vmd_colors(n=33, picker=FALSE, ...)

Arguments

n

The number of desired colors chosen in sequence from the VMD color palette (>=1)

picker

Logical, if TRUE a color wheel plot will be produced to aid with color choice.

...

Extra arguments passed to the rgb function, including alpha transparency.

Details

The function uses the underlying 33 RGB color codes from VMD, See http://www.ks.uiuc.edu/Research/vmd/. Note that colors will be recycled if “n” > 33 with a warning issued. When ‘picker’ is set to “TRUE” a color wheel of the requested colors will be plotted to the currently active device.

Value

Returns a character vector with color names.

Author(s)

Barry Grant

References

Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.

See Also

Examples

## Generate a vector of 10 colors
clrs <- vmd_colors(10)
vmd_colors(4, picker=TRUE)

bio3d

Biological Structure Analysis

v2.4-2
GPL (>= 2)
Authors
Barry Grant [aut, cre], Xin-Qiu Yao [aut], Lars Skjaerven [aut], Julien Ide [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.