new_colorref
The new_colorref function is a non-class version of the CColorRef:new method which creates and returns a new CColorRef object. The CColorRef class includes 3 properties for R, G, and B color intensities.
| 
 C = new_colorref() 
 C = new_colorref( CColorRef_old ) 
 C = new_colorref( R, G, B ) 
  | 
Three overloads are provided for this method. They create a default CColorRef, a copy of a CColorRef, or an initialized CColorRef. If you pass something other than nil, a CColorRef, or data member values—such as a string—the default constructor is used.
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  | 
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.