 In the below working example, courtesy of Mijikai, there are three possible colours, which, according to the API documentation, can be used in various combinations, though still very limited.  As this is a very uninspiring and bland grey, reminiscent of a dull sky, is there a way to set each RGB colour specifically?  By contrast, in the equivalent Windows console properties (cmd window), there are three RGB settings that can be set — for example an ideal combination 240, 240, 240.  This doesn't seem to be mentioned in the API document.  Is it possible to do this programmatically?
   In the below working example, courtesy of Mijikai, there are three possible colours, which, according to the API documentation, can be used in various combinations, though still very limited.  As this is a very uninspiring and bland grey, reminiscent of a dull sky, is there a way to set each RGB colour specifically?  By contrast, in the equivalent Windows console properties (cmd window), there are three RGB settings that can be set — for example an ideal combination 240, 240, 240.  This doesn't seem to be mentioned in the API document.  Is it possible to do this programmatically?https://learn.microsoft.com/en-us/windo ... attributes
Code: Select all
Procedure Set_Up_Console()
  
  Define librno.i
  Define handle.i
  Define hwnd.i
  Define csbi.CONSOLE_SCREEN_BUFFER_INFO
  Define conoffset.i
  Define conlength.i
  Define cx, cy
  
  OpenConsole()
  librno.i=OpenLibrary(#PB_Any,"kernel32.dll")
  hwnd.i=CallFunction(librno.i,"GetConsoleWindow")
  CloseLibrary(librno.i)
  handle = GetStdHandle_(#STD_OUTPUT_HANDLE)
  If handle <> #INVALID_HANDLE_VALUE
    If GetConsoleScreenBufferInfo_(handle,@csbi)
      If SetConsoleTextAttribute_(handle,#BACKGROUND_BLUE|#BACKGROUND_GREEN|#BACKGROUND_RED)
        FillConsoleOutputAttribute_(handle,#BACKGROUND_BLUE|#BACKGROUND_GREEN|#BACKGROUND_RED,csbi\dwSize\x * csbi\dwSize\y,conoffset,@conlength)
      EndIf
    EndIf
  EndIf
  cx = GetSystemMetrics_(#SM_CXSCREEN);
  cy = GetSystemMetrics_(#SM_CYSCREEN);
  SetWindowPos_(hwnd,#Null,-5, 100,#Null,#Null,#SWP_NOSIZE|#SWP_NOZORDER)
  
  ConsoleTitle("Title")
  ConsoleColor(3,7)
  PrintN("Welcome...")
  ConsoleColor(1,7)
  PrintN("Console ")
  Input()
  
EndProcedure
Set_Up_Console()












 ) but that seemed to be my finding earlier.
 ) but that seemed to be my finding earlier.