Manual     Reference     Scripting  
  
Scripting > Runtime Classes > Color32   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Attributes
  • Enumerations
  • History
  • Index
  • Color32
  • All Members
  • Variables
  • a
  • b
  • g
  • r
  • Constructors
  • Color32
  • Functions
  • ToString
  • Class Functions
  • Lerp
  • operator Color
  • operator Color32

Color32.ToString  

function ToString () : String

function ToString (format : String) : String

Description

Returns a nicely formatted string of this color.

JavaScript
var w : Color32 = Color.white;
print(w.ToString("x"));

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
public Color32 w = Color.white;
void Example() {
print(w.ToString("x"));
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

public w as Color32 = Color.white

def Example():
print(w.ToString('x'))