Color

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(color in unity, will need to expanded later.)
 
(Unity Color Class)
 
Line 1: Line 1:
  
== Unity Color Class ==
 
 
The color class is unity is based off an RGBA model, where the values for red, green, blue, and alpha(transparency) are specified with [https://msdn.microsoft.com/en-us/library/b1e65aza.aspx float] values between 0 and 1. An alpha of 0 is completely transparent, while 1 is fully opaque. A color can be created with or without the alpha value specified.
 
The color class is unity is based off an RGBA model, where the values for red, green, blue, and alpha(transparency) are specified with [https://msdn.microsoft.com/en-us/library/b1e65aza.aspx float] values between 0 and 1. An alpha of 0 is completely transparent, while 1 is fully opaque. A color can be created with or without the alpha value specified.
 +
 +
== Creating Color in Unity ==
  
 
Creating a color in CSharp:
 
Creating a color in CSharp:

Latest revision as of 03:03, 2 February 2016

The color class is unity is based off an RGBA model, where the values for red, green, blue, and alpha(transparency) are specified with float values between 0 and 1. An alpha of 0 is completely transparent, while 1 is fully opaque. A color can be created with or without the alpha value specified.

[edit] Creating Color in Unity

Creating a color in CSharp:

public Color myColor = new Color(.2f, .3f, .4f);
public Color transparentColor = new Color(.2f, .3f, .4f, 0);

Creating a color in JavaScript:

var myColor : Color = Color(0.2, 0.3, 0.4,);
var transparentColor : Color = Color(0.2, 0.3, 0.4, 0);
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox