All examples · Sprites and 2D

Tint and colour

What this example shows

A sprite's tint is a colour multiplied into what it draws. The top row colourizes one texture five ways; the middle row has no texture, so the tint paints flat squares.

The one at the bottom is a hit flash: useTween carries a number from 0 to 1 and back, and lerpColor reads that number as how much red is mixed in. The tween never learns what a colour is, which is exactly why the two compose.

Starting