invert: Invert a color

Description Usage Arguments Value Note Examples

Description

invert inverts each channel of a color in RGB space

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 inverted color as a hexadecimal string

Note

Alpha channel values are be stripped from col

Examples

1
invert('#FF00FF')

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