skip to main content

Library Routines : W$PALETTE

W$PALETTE
The W$PALETTE library routine provides a number of functions to manage RGB colors and COBOL attributes.
NOTE -   isCOBOL allows to work with RGB colors. A maximum of 16 million concurrent colors can be displayed on the screen at the same time. However, some old languages display only 16 colors at a time. For compatibility reasons isCOBOL supports this library routine, that allows definition of a palette of usable colors. In any case it is important to pinpoint that the use of this routine is deprecated.
Syntax:
 CALL "W$PALETTE" USING opCode 
Parameters:
Return code:
returnCode definition and meaning depend on the opcode.
Examples:
Example - Select a color from palette and change a numbered color with the selection
working-storage section.
copy "isgui.def"
78  78color   value 3.
77  result    pic 9(2).
procedure division.
   initialize wpalette-data 
   call "w$palette" using wpalette-choose-color,
        giving result 
   move 78color to wpal-color-id
   call "w$palette" using wpalette-set-color,
        giving result.
Example - Select a color from palette and change a numbered color with the selection
working-storage section.
copy "isgui.def"
78  78color   value 3.
77  result    pic 9(2).
procedure division.
   initialize wpalette-data 
   call "w$palette" using wpalette-choose-color,
        giving result 
   move 78color to wpal-color-id
   call "w$palette" using wpalette-set-color,
        giving result.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left