-
-
Notifications
You must be signed in to change notification settings - Fork 23
Invert colors
Nick edited this page Apr 10, 2020
·
4 revisions
The algorithm for inverting the color is very simple. The inverted color is the difference of the maximum color value minus the current value. It's like the opppsite value of your color in color range.
|---------- ----------------------- ----------|
0 /\ /\ 255
Dark |color |inverted Bright
This calculation is typically done for each color chanel. With InvertColors you can contoll the inveration for each chanel.
InvertColors.apply(PImage image, boolean red, boolean green, boolean blue)