CColorRef:Get
The Get method returns the red, green, and blue color components as numbers in the range 0 to 255.
R, G, B = CColorRef:Get() |
On success the 3 color components R, G, and B are returned.
On failure, this method returns 0, 0, 0.
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 |