{{newin|[[0.8.0]]|080|type=method}}
Sets the color that will be used for the next add and set operations. Calling the function without arguments will disable all per-sprite colors for the SpriteBatch.

In versions prior to [[11.0]], color component values were within the range of 0 to 255 instead of 0 to 1.

In version [[0.9.2]] and older, 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 ===
<source lang="lua">
SpriteBatch:setColor( r, g, b, a )
</source>
=== Arguments ===
{{param|number|r|The amount of red.}}
{{param|number|g|The amount of green.}}
{{param|number|b|The amount of blue.}}
{{param|number|a (1)|The amount of alpha.}}
=== Returns ===
Nothing.

== Function ==
Disables all per-sprite colors for this SpriteBatch.
=== Synopsis ===
<source lang="lua">
SpriteBatch:setColor( )
</source>
=== Arguments ===
None.
=== Returns ===
Nothing.

== See Also ==
* [[parent::SpriteBatch]]
* [[SpriteBatch:getColor]]
* [[SpriteBatch:add]]
* [[SpriteBatch:set]]
[[Category:Functions]]
{{#set:Description=Sets the color that will be used for the next add or set operations.}}
{{#set:Since=080}}
== Other Languages ==
{{i18n|SpriteBatch:setColor}}