Apply a color tint overlay to the current canvas content
Uses source-atop composite operation to tint existing pixels while preserving alpha.
Canvas 2D rendering context
Width in pixels
Height in pixels
Tint color (CSS color string)
applySpriteTint(ctx, 24, 24, '#ff0000'); // Tint to red Copy
applySpriteTint(ctx, 24, 24, '#ff0000'); // Tint to red
Apply a color tint overlay to the current canvas content
Uses source-atop composite operation to tint existing pixels while preserving alpha.