Calculates a new color that is a blend of two other colors. The amt parameter controls the amount of each color to use where an amount of 0.0 will produce the first color, 1.0 will return the second color, and 0.5 is halfway in between. Values between 0.0 and 1.0 will interpolate betwe
(int c1, int c2, float amt)
| 9629 | * @see PApplet#lerp(float, float, float) |
| 9630 | */ |
| 9631 | public int lerpColor(int c1, int c2, float amt) { |
| 9632 | if (g != null) { |
| 9633 | return g.lerpColor(c1, c2, amt); |
| 9634 | } |
| 9635 | // use the default mode (RGB) if lerpColor is called before setup() |
| 9636 | return PGraphics.lerpColor(c1, c2, amt, RGB); |
| 9637 | } |
| 9638 | |
| 9639 | |
| 9640 | static public int blendColor(int c1, int c2, int mode) { |
no test coverage detected