Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Color.Color

マニュアルに切り替える
public Color(float r, float g, float b, float a);

パラメーター

r 赤成分
g 緑成分
b 青成分
a アルファ成分

説明

r、g、b、a 成分から Color を作成します。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Color color = new Color(0.2F, 0.3F, 0.4F, 0.5F); }

public Color(float r, float g, float b);

パラメーター

r 赤成分
g 緑成分
b 青成分

説明

r、g、b 成分と a を 1 として Color を作成します。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Color color = new Color(0.2F, 0.3F, 0.4F); }