Color.grayscale 灰度

var grayscale : float

Description描述

The grayscale value of the color (Read Only)

颜色的灰度值(只读)

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public Color color = new Color(0.3F, 0.4F, 0.6F);
	public void Awake() {
		print(color.grayscale);
	}
}
var color : Color = Color (.3, .4, .6);
print(color.grayscale);
Page last updated: 2010-12-16