col.rep: color repetition

Description Usage Arguments Details Value Author(s) Examples

View source: R/clusterluts.R

Description

Repeat color col n times as columns in a 3xn RGB color matrix. Analog to rep which is used internally.

Usage

1
col.rep(col, n, alpha = FALSE)

Arguments

col

color (valid input to col2rgb

n

number of repetitions (should be a positive integer value)

alpha

either logical or actual alpha (in [0..255])

Details

If col consists of more than one color, those colors are recycl the usual rules to reach n colors. In the special case where n is smaller than thenumber of colors in col, only the first n colors will be returned.

For n<1 an empty matrix is returned.

Value

color matrix with n columns of color col

Author(s)

Benno Pütz puetz@psych.mpg.de

Examples

1
col.rep('red', 3)

bennop/clusterLUTs documentation built on Nov. 21, 2020, 9:07 a.m.