4D v13

PV COLOR TO RGB

Home

 
4D View v13
PV COLOR TO RGB

PV COLOR TO RGB 


 

PV COLOR TO RGB ( color ; red ; green ; blue ) 
Parameter Type   Description
color  Longint in Color
red  Integer in Red component (0 to 255)
green  Integer in Green component (0 to 255)
blue  Integer in 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.

Example  

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)

 
PROPERTIES 

Product: 4D
Theme: PV Tools
Number: 15871

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D View 6.8

 
SEE ALSO 

PV RGB to color