4D View v14

PV COLOR TO RGB

Home

 
4D View v14
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.

Note: Internal coding of 4D View colors is of the BGR type, which is reversed with respect to 4D's RGB coding; however, the principles of use are the same.

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 View
Theme: PV Tools
Number: 15871

 
HISTORY 

Created: 4D View 6.8

 
SEE ALSO 

PV RGB to color

 
ARTICLE USAGE

4D View Language ( 4D View v11.4)
4D View Language ( 4D View v12)
4D View Language ( 4D View v14)
4D View Language ( 4D v13)
4D View Language ( 4D View v14 R2)
4D View Language ( 4D View v14 R3)
4D View Language ( 4D View v14 R4)