complement: Get a color's complement

Description Usage Arguments Value Examples

Description

complement returns a color's complement, which is the hue adjusted by 180 degrees

Usage

1

Arguments

col

Vector containing any of the three kinds of R color specifications:

  1. a color name (see colors)

  2. a hexadecimal string of the form "#rrggbb" (see rgb)

  3. a positive integer i meaning palette()[i]

Value

The adjusted color(s) as hexadecimal strings

Examples

1
2
# Get orange's complement
complement("orange")

briandconnelly/colormod documentation built on May 13, 2019, 5:13 a.m.