Highlighted
New Member.
284 views

Reading color of user screen

I am run on redhat 7.3 using screen sections with foreground and background color and would like to know if there is a way to determine if a user screen is showing up properly in color, because if it is not then I want to try for white on gray instead of the stark white and black that happens now. Maybe the lack of expected results is due to terminal type or some other setting but I think I should be able to write a character in say white on blue and then read that character to see if that is the result I expected. Was thinking about the library routine of cbl_read_scr_chattrs but not sure how to compare the information received in the attribute buffer.  Any suggestions?   Snip from current code below where I have had to use the routine for cbl_scr_set_pc_attribute to have screen rewrites work properly.

Thank you.

 

       01  SCREEN-1
           BLANK SCREEN
           HIGHLIGHT
           FOREGROUND-COLOR IS FORE-COLOR
           BACKGROUND-COLOR IS BACK-COLOR.

 

           DISPLAY SCREEN-1.
          
           call "CBL_SCR_SET_PC_ATTRIBUTES" returning
               SCREEN-STATUS-CODE.

Tags (1)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.