Name: reverse

Type: keyword

Syntax: reverse

Summary: Specifies one of the <transfer mode|transfer modes> that can be used with the <ink> <property>.

Introduced: 1.0

OS: mac,windows,linux,ios,android

Platforms: desktop,server,web,mobile

Example:
set the inkMode of graphic "Inversion" to reverse

Description:
Use the <reverse> <keyword> to invert the color under an <object>.

The <ink> <property> determines how an <object|object's> colors combine with the colors of the <pixels> underneath the <object> to determine how the <object|object's> color is displayed. When the <reverse> mode is used, each component of the color underneath the <object> --red, green, and blue--is inverted, and the inverse is used for the displayed color.

If the color is expressed as three integers between zero and 255--one for each of red, green, and blue--then the inverse of each component is equal to 255 minus the component's value. The color of the object itself does not affect the final color.

For example, suppose an object's color is 90,70,250, and the color of a pixel under the object is 60,250,100. If the <reverse> mode is used, the <pixel|pixel's> displayed color is 195,5,155<a/>. (255 minus 60 is 195, 255 minus 250 is 5, and 255 minus 100 is 155.)

References: notSrcCopy (keyword), ink (property), pixels (property), object (object), property (glossary), keyword (glossary), pixel (glossary), transfer mode (glossary)

Tags: ui
