Complement {painter}R Documentation

Generate the complement (opposite hue) of a color, or generate a palette from a color and its complement.

Description

Given a color, Complement() maintains the same value and saturation, but returns a color of the opposite hue. ComplementPalette() creates a color palette that ramps between a color and its complement.

Usage

Complement(color)
ComplementPalette(color,n=100)

Arguments

color

A color or (for Complement) possibly a vector of colors

n

The number of colors to produce

Value

For Complement(), a vector of colors with the same length as color. For ComplementPalette() a vector of n colors

Author(s)

Brody Sandel

Examples

TestPalette(Complement(terrain.colors(100)))
TestPalette(ComplementPalette("blue"))

[Package painter version 0.1.0 Index]