Manual     Reference     Scripting  
  
Scripting > Runtime Classes > Color   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Attributes
  • Enumerations
  • History
  • Index
  • Color
  • All Members
  • Variables
  • a
  • b
  • g
  • grayscale
  • r
  • this [int index]
  • Constructors
  • Color
  • Functions
  • ToString
  • Class Variables
  • black
  • blue
  • clear
  • cyan
  • gray
  • green
  • grey
  • magenta
  • red
  • white
  • yellow
  • Class Functions
  • Lerp
  • operator *
  • operator +
  • operator -
  • operator /
  • operator Color
  • operator Vector4

Color.grayscale  

var grayscale : float

Description

The grayscale value of the color (Read Only)

JavaScript
var color : Color = Color (.3, .4, .6);
print(color.grayscale);

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
public Color color = new Color(0.3F, 0.4F, 0.6F);
void Example() {
print(color.grayscale);
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

public color as Color = Color(0.3F, 0.4F, 0.6F)

def Example():
print(color.grayscale)