CColorRef:Get


The Get method returns the red, green, and blue color components as numbers in the range 0 to 255.

Syntax

R, G, B = CColorRef:Get()

bullet.gif    On success the 3 color components R, G, and B are returned.

bullet.gif    On failure, this method returns 0, 0, 0.

Example

The following script returns the 3 color components. In this example, C:Get() is the last (or only) argument to Printf, so all 3 returned values can be obtained within the call to Printf:

C = new_colorref()

-- create a new CColorRef

C:Set(255,100,0)

-- set to orange

Printf("Color: %d,%d,%d", C:Get() )

-- result: Color: 255,100,0

Related Topics

CColorRef, Set, ChoosePal


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.