{{newin|[[0.2.0]]|020|type=function}}
Sets the [[BlendMode|blending mode]].

== Function ==
=== Synopsis ===
<source lang="lua">
love.graphics.setBlendMode( mode )
</source>
=== Arguments ===
{{param|BlendMode|mode|The blend mode to use.}}
=== Returns ===
Nothing.

== Function ==
{{newin|[[0.10.0]]|100|type=variant}}
=== Synopsis ===
<source lang="lua">
love.graphics.setBlendMode( mode, alphamode )
</source>
=== Arguments ===
{{param|BlendMode|mode|The blend mode to use.}}
{{param|BlendAlphaMode|alphamode ("alphamultiply")|What to do with the alpha of drawn objects when blending.}}
=== Returns ===
Nothing.
=== Notes ===
The default "alphamultiply" alpha mode should normally be preferred except when drawing content with pre-multiplied alpha. If content is drawn to a [[Canvas]] using the "alphamultiply" mode, the Canvas texture will have pre-multiplied alpha afterwards, so the "premultiplied" alpha mode should generally be used when drawing a Canvas to the screen.

==Example==
<source lang="lua">
function love.load()
	love.graphics.setBackgroundColor(54/255, 172/255, 248/255)
end

function love.draw()
	love.graphics.setBlendMode("alpha") --Default blend mode
	love.graphics.setColor(230/255, 44/255, 123/255)
	love.graphics.rectangle("fill", 50, 50, 100, 100)
	
	love.graphics.setColor(12/255, 100/255, 230/255)
	love.graphics.setBlendMode("multiply")
	love.graphics.rectangle("fill", 75, 75, 125, 125)
end
</source>

== See Also ==
* [[parent::love.graphics]]
* [[love.graphics.getBlendMode]]
* [[BlendMode]]
[[Category:Functions]]
{{#set:Description=Sets the blending mode.}}
{{#set:Sub-Category=State}}
== Other Languages ==
{{i18n|love.graphics.setBlendMode}}