CColorRef:delete CColorRef:Set

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()

Example

The following script fragment 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 = CColorRef:new()

-- 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