| 4D v13PV COLOR TO RGB | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D View v13
 PV COLOR TO RGB 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PV COLOR TO RGB ( color ; red ; green ; blue ) | ||||||||
| Parameter | Type | Description | ||||||
| color | Longint |   | Color | |||||
| red | Integer |   | Red component (0 to 255) | |||||
| green | Integer |   | Green component (0 to 255) | |||||
| blue | Integer |   | Blue component (0 to 255) | |||||
The PV COLOR TO RGB command returns, in the red, green and blue parameters, the three RGB components of color.
Refer to the description of the 4D OBJECT SET RGB COLORS command for detailed information on the color system used by 4D.
Display the three RGB components of the background color of cell A1:
 C_LONGINT($Color)
 C_INTEGER($Red;$Green;$Blue)
 
 PV SET CELL STRING VALUE(Area;2;1;"Color") `Labels
 PV SET CELL STRING VALUE(Area;2;2;"Red")
 PV SET CELL STRING VALUE(Area;2;3;"Green")
 PV SET CELL STRING VALUE(Area;2;4;"Blue")
 
 $Color:=PV Get cell property(Area;1;1;pv style color back odd)
 PV COLOR TO RGB($Color;$Red;$Green;$Blue)
 
 PV SET CELL NUM VALUE(Area;1;2;$Red) `Values
 PV SET CELL NUM VALUE(Area;1;3;$Green)
 PV SET CELL NUM VALUE(Area;1;4;$Blue)
	Product:  4D
	Theme:  PV Tools
	Number:  
        15871
        
        
        
	
	Created:  4D View 6.8