craftyjs.github.com

Tint

Similar to Color by adding an overlay of semi-transparent color.

Note: Currently only works for Canvas

Back to top

.tint

Events

Change
when the tint is applied

public this .tint(String color, Number strength)

color
The color in hexadecimal
strength
Level of opacity

Modify the color and level opacity to give a tint on the entity.

Example

Crafty.e("2D, Canvas, Tint")
   .tint("#969696", 0.3);