CColorRef:new
The new method constructs a new instance of a CColorRef object. The CColorRef class includes 3 properties for R, G, and B color intensities. Three different constructor overloads are available to create a new CColorRef and initialize the properties.
C = CColorRef:new() C = CColorRef:new( CColorRef2 ) C = CColorRef:new( R, G, B ) where
|
The following script computes the equivalent gray intensity using 2 different constructors:
|
-- create CColorRef A with values |
|
-- copy A to a new CColorRef B |
|
-- complement the color |
|
-- result: 255,140,5 -> 158.19 |
|
-- result: 255,140,5 -> 158.19 |