Sets the color used for drawing.

バージョン [[11.0 (日本語)|11.0]] まで、色成分値は 0 〜 1 (小数値) ではなく 0 〜 255 (整数値) の範囲内です。
== 関数 ==
=== 概要 ===
<source lang="lua">
love.graphics.setColor( red, green, blue, alpha )
</source>
=== 引数 ===
{{param (日本語)|number|red|赤色の量。}}
{{param (日本語)|number|green|緑色の量。}}
{{param (日本語)|number|blue|青色の量。}}
{{param (日本語)|number|alpha (1)|アルファの量。イメージの描画であろうと、アルファ値は以降の描画処理で適用されます。}}
=== 返値 ===
ありません。

== 関数 ==
{{newin (日本語)|[[0.7.0 (日本語)|0.7.0]]|070|type=異形}}
=== 概要 ===
<source lang="lua">
love.graphics.setColor( rgba )
</source>
=== 引数 ===
{{param (日本語)|table|rgba|A numerical indexed table with the red, green, blue and alpha values as [[number]]s. The alpha is optional and defaults to 1 if it is left out.}}
=== 返値 ===
ありません。
== 用例 ==
=== Draw a red, blue and green circle ===
<source lang="lua">
function love.draw()
	love.graphics.setColor(1, 0, 0)
	love.graphics.circle("fill", 50, 50, 20)

	love.graphics.setColor(0, 0, 1)
	love.graphics.circle("fill", 50, 100, 20)

	myColor = {0, 1, 0, 1}
	love.graphics.setColor(myColor)
	love.graphics.circle("fill", 50, 150, 20)
end
</source>
=== Display a Venn diagram ===
<source lang="lua">
function love.load()
	baseX = 300
	baseY = 400
	radius = 100
	offsetY = radius*.5*math.sqrt(3)
	love.graphics.setBackgroundColor(1, 1, 1)
end

function love.draw()
	love.graphics.setColor(1, 0, 0, 0.4)
	love.graphics.circle('fill', baseX, baseY, radius)
	love.graphics.setColor(0, 1, 0, 0.4)
	love.graphics.circle('fill', baseX + radius / 2, baseY - offsetY, radius)
	love.graphics.setColor(0, 0, 1, 0.4)
	love.graphics.circle('fill', baseX + radius, baseY, radius)
end
</source>

== 関連 ==
* [[parent::love.graphics (日本語)]]
* [[HSL color]] (an alternate color space, based on human perception)
[[Category:Functions (日本語)]]
{{#set:Description=Sets the color used for drawing.}}
{{#set:Since=000}}
{{#set:Sub-Category=State (日本語)}}
== そのほかの言語 ==
{{i18n (日本語)|love.graphics.setColor}}