4D View v16PV COLOR TO RGB |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D View v16
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.
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.
Display the three RGB components of the background color of cell A1:
C_LONGINT($Color)
C_LONGINT($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 View
Theme: PV Tools
Number:
15871
Created: 4D View 6.8
4D View Language ( 4D View v16)