Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Differing ANSI color palettes in TCC on Windows 11, depending on context (?).

Nov
358
10
On Windows 11, when running TCC by itself (over the console host or the Windows Terminal), text coloring by TCC (like, say, when doing COLORDIR) takes one palette (I assume TCMD's own), but when coloring directly through ANSI sequences, it uses another one (which I assume is the OS's default palette). TCC running over TCMD, however, uses the same palette for both; this doesn't happen on Windows 10.

Now, these are two different computers, and it may well be that something has gone haywire on the registry of either, but I don't know if that should be it (or WHERE to look at this). TCMD.INI is the same on both computers and its configuration shouldn't be an issue, I believe (the "ANSI" directive is set to "No" in [TCMD] and to "Yes" in [4NT]; playing around with those values did not produce a difference).


(I like the new palette better, too)
 

Attachments

  • ansi.bat
    ansi.bat
    522 bytes · Views: 1
  • colordir.bat
    colordir.bat
    199 bytes · Views: 0
  • W10.webp
    W10.webp
    138.5 KB · Views: 6
  • W11.webp
    W11.webp
    225.4 KB · Views: 8
  • TCMD.INI
    TCMD.INI
    6.9 KB · Views: 2
TCC running by itself (i.e., a console window) gets the default console color palette or the custom palette for just TCC, depending on how you defined / saved your console settings. TCC doesn't know which; that is handled by the console host.

TCC calls the Windows API GetConsoleScreenBufferInfoEx to get the palette. It then checks TCMD.INI to see if you've defined a custom palette (in OPTION), and overwrites the Windows-defined palette if it finds one.

TCMD doesn't know or care about the console palettes. It defines a default color palette based on the stock Windows colors. It then checks to see if you defined a custom palette in the TCMD configuration (Tabs / Windows Colors).

When you're using ANSI sequences, Windows (the console host) is responsible for choosing and displaying colors.
 
Back
Top