Algosim documentation: InvertColor

InvertColor

Returns a colour or pixmap inverted.

Syntax

Description

If c is a colour, then InvertColor(c) returns the inverted colour of c. This is obtained by taking the complement of each RGB channel, that is,

InvertColor(rgb(r, g, b)) = rgb(1 − r, 1 − g, 1 − b).

If pm is a pixmap, then InvertColor(pm) returns pm with every pixel inverted as described above.

Examples

InvertColor(ExampleData("Sally"))

Image 1

See also