Learn R Programming

multiblock (version 0.8.8.2)

mcolors: Colour palette generation from matrix of RGB values

Description

Colour palette generation from matrix of RGB values

Usage

mcolors(
  n,
  colmatrix = matrix(c(0, 0, 1, 1, 1, 1, 1, 0, 0), 3, 3, byrow = TRUE)
)

Value

A vector of n colours in hexadecimal RGB format.

Arguments

n

Integer number of colorus to produce.

colmatrix

A numeric matrix of three columns (R,G,B) to generate colour palette from.

Examples

Run this code
mcolors(5)

Run the code above in your browser using DataLab