Sets the background color.

{{notice|In versions prior to [[11.0]], color component values were within the range of 0 to 255 instead of 0 to 1.}}
== 関数 ==
=== 概要 ===
<source lang="lua">
love.graphics.setBackgroundColor( red, green, blue, alpha )
</source>
=== 引数 ===
{{param (日本語)|number|red|The red component (0-1).}}
{{param (日本語)|number|green|The green component (0-1).}}
{{param (日本語)|number|blue|The blue component (0-1).}}
{{New feature (日本語)|0.8.0|
{{param (日本語)|number|alpha (1)|The alpha component (0-1).}}
|080}}
=== 返値 ===
ありません。
===  用例 ===
<source lang="lua">
function love.draw()
    -- Set Background Color to #731b87 (115, 27, 135) with an alpha of 50%
    -- Note: Remember that Love uses 0-1 and not 0-255
    red = 115/255
    green = 27/255
    blue = 135/255
    alpha = 50/100
    love.graphics.setBackgroundColor( red, green, blue, alpha)
end
</source>

== 関数 ==
{{newin (日本語)|[[0.7.0 (日本語)|0.7.0]]|070|type=異形}}
=== 概要 ===
<source lang="lua">
love.graphics.setBackgroundColor( rgb )
</source>
=== 引数 ===
{{param (日本語)|table|rgb|A numerical indexed table with the red, green and blue values as [[number]]s.}}
=== 返値 ===
ありません。
===  用例 ===
<source lang="lua">
function love.draw()
    -- Set Background Color to #1b8724 (27, 135, 36)
    -- Note: Remember that Love uses 0-1 and not 0-255
    red = 27/255
    green = 135/255
    blue = 36/255
    color = { red, green, blue}
    love.graphics.setBackgroundColor( color)
end
</source>

== 関数 ==
{{newin (日本語)|[[0.8.0 (日本語)|0.8.0]]|080|type=異形}}
=== 概要 ===
<source lang="lua">
love.graphics.setBackgroundColor( rgba )
</source>
=== 引数 ===
{{param (日本語)|table|rgba|A numerical indexed table with the red, green, blue and alpha values as [[number]]s.}}
=== 返値 ===
ありません。
===  用例 ===
<source lang="lua">
function love.draw()
    -- Set Background Color to #731b87 (115, 27, 135) with an alpha of 50%
    -- Note: Remember that Love uses 0-1 and not 0-255
    red = 115/255
    green = 27/255
    blue = 135/255
    alpha = 50/100
    color = { red, green, blue, alpha}
    love.graphics.setBackgroundColor( color)
end
</source>

== 関連 ==
* [[parent::love.graphics (日本語)]]
* [[love.graphics.clear (日本語)]]
* [[love.graphics.getBackgroundColor (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Sets the background color.}}
{{#set:Since=000}}
{{#set:Sub-Category=State (日本語)}}
== そのほかの言語 ==
{{i18n (日本語)|love.graphics.setBackgroundColor}}