CALL "W$PALETTE" USING WPALETTE-GET-COLOR                          WPALETTE-DATA                  GIVING returnCode  | 
WPALETTE-GET-COLOR  | Constant  | |
WPALETTE-DATA  | Group Item  | Group item that specifies the COBOL color attribute the function refers to and receives the corresponding RGB color. This group item, defined in ispalette.def, has the following structure: 01  wpalette-data.     03 wpal-color-id            pic x comp-x.     03 wpal-flags        redefines wpal-color-id  pic x comp-x.     03 wpal-red                 pic x comp-x.     03 wpal-user-color-id        redefines wpal-red       pic x comp-x.     03 wpal-green               pic x comp-x.     03 wpal-blue                pic x comp-x. wpal-color-id It must be set to the COBOL color attribute before calling the function. It must range from 1 to 16. wpal-flags Not used. wpal-red Receives the red component of the color associated to the COBOL color attribute. It may range from 0 to 255. wpal-user-color-id Not used. wpal-green Receives the green component of the color associated to the COBOL color attribute. It may range from 0 to 255. wpal-blue Receives the blue component of the color associated to the COBOL color attribute. It may range from 0 to 255.  | 
1   | Operation successful.  | 
WPERR-UNSUPPORTED  | The W$PALETTE library routine is not supported. wpaletteData is not updated.  | 
WPERR-BAD-ARG  | The function has received incorrect parameters. wpaletteData is not updated.  |