This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20.6
OBJECT GET RGB COLORS

OBJECT GET RGB COLORS 


 

OBJECT GET RGB COLORS ( {* ;} object ; foregroundColor {; backgroundColor {; altBackgrndColor}} ) 
Parameter Type   Description
Operator in If specified, object is an object name (string) If omitted, object is a variable or a field
object  Form object in Object name (if * is specified) or
Variable or field (if * is omitted)
foregroundColor  Text, Longint in RGB color value for foreground
backgroundColor  Text, Longint in RGB color value for background
altBackgrndColor  Text, Longint in RGB color value for alternating background

The OBJECT GET RGB COLORS command returns the foreground and background colors of the object or group of objects designated by object.

If you pass the optional * parameter, you indicate that the object parameter is an object name (string). If you do not pass this parameter, you indicate that the object parameter is a field or a variable. In this case, you pass a field or variable reference (object field or variable only) instead of a string. 

A valid backgroundColor value is only returned for objects supporting the background color attribute

When the command is applied to a list box type object, the alternating background color for the rows can be returned in the altBackgrndColor parameter. In this case, the value of backgroundColor is used for the background of odd-numbered rows only. 

The RGB color values returned in the foregroundColorbackgroundColor, and altBackgrndColor parameters depend on the parameter type: 

  • if a parameter of text type is passed, the color is returned in CSS format with "#rrggbb" syntax (ex: "#0000FF")
  • if a parameter of longint type is passed, the color can be 4-byte Long Integer of the format (0x00RRGGBB) or negative values corresponding to the "system" colors.

For more information about the format of the foregroundColor, backgroundColor, and altBackgrndColor parameters, refer to the description of the OBJECT SET RGB COLORS command.



See also 

OBJECT SET RGB COLORS

 
PROPERTIES 

Product: 4D
Theme: Objects (Forms)
Number: 1074

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v12
Modified: 4D v17 R6

 
ARTICLE USAGE

4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)