##### Views

- Page
- Discussion
- View source
- History

# SpriteBatch:setColor

Available since LÖVE 0.8.0
This method is not supported in earlier versions.

Sets the color that will be used for the next add and set operations. Calling the function without arguments will clear the color.

The global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color.

## Function

### Synopsis

SpriteBatch:setColor( )

### Arguments

None.

### Returns

Nothing.

## Function

### Synopsis

SpriteBatch:setColor( r, g, b, a )

### Arguments

`number r`
  The amount of red.
`number g`
  The amount of green.
`number b`
  The amount of blue.
`number a (255)`
  The amount of alpha.

### Returns

Nothing.

## See Also

- SpriteBatch

## Other Languages

Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – Tiếng Việt – 한국어
More info

Retrieved from "https://www.love2d.org/wiki/SpriteBatch:setColor"
Categories: Templates | Functions

##### Personal tools

- Log in

##### Search

##### Toolbox

- What links here
- Related changes
- Special pages
- Printable version
- Permanent link
- Browse properties