SetImageColorMod

Category: Images and Rendering

Back to System Functions


Signature

SetImageColorMod(imageReference As Integer, red As Integer, green As Integer, blue As Integer, alpha As Integer)

Returns

Void

Description

Sets the color modulation stored on an image. Future DrawImage, DrawImageSub, DrawNineSlice, and DrawBuffer calls using that image use the supplied RGBA tint.

Each color component is an integer from 0 to 255. A value of 255, 255, 255, 255 preserves the original image colors.

Example

hero = LoadImage("player.png")
SetImageColorMod(hero, 255, 160, 160, 255)
DrawImage(hero, 100, 80)