Welcome!

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

SignUp Now!

TCC and TCMD colors

Jul
350
1
I cannot for the life of me find a way to have the backgrounds black. Yea, I know I've played with it over the years, but isn't there a way to get from my blue background to black?

I've tried various setups that come with the program, but I still end up where I started, no black background.

Help?
 
If you detach a tab (right-click on the tab and select 'Detach Tab'), then do cls /c white on black, what do you get?
 
What version of Windows are you using? If it's Windows 11 and you're NOT in TakeCommand, are you in a console (foreground below) or in Windows Terminal (background below).

1730581222689.webp
 
I had White on Blue in my tcstart, but I tried remming it out and that didn't help. I'm a bit elderly, but as I recall I even uninstalled TCMD, and started over. Same result, no change.
 
Last edited:
If "black" is blue, then I'm pretty sure your console color palette is screwed up. (Take Command inherits its tab colors from the underlying console window.) If you will paste and run this command in the miscolored Take Command window:

Code:
echo %@regdelkey["HKCU\Console\%@replace[\,_,%_cmdspec]"]

... then close and restart Take Command, your colors should be back to normal.
 
If "black" is blue, then I'm pretty sure your console color palette is screwed up. (Take Command inherits its tab colors from the underlying console window.) If you will paste and run this command in the miscolored Take Command window:

Code:
echo %@regdelkey["HKCU\Console\%@replace[\,_,%_cmdspec]"]

... then close and restart Take Command, your colors should be back to normal.
I could be wrong, but that won't work if he's in Windows Terminal (or will it?).
 
I could be wrong, but that won't work if he's in Windows Terminal (or will it?).

That registry key is only for the console, yes. Take Command always creates a hidden console window, not a Terminal window.
 
I read the subject of this thread as TCC colors and TCMD colors. From the discussion so far I gether it's about TCC's colors when in TCMD.

Does TCMD honor what's in HKCU\Console or what's in the hidden console? I thought this is where the colors are set.

1730597206695.webp
 
I know that Take Command tab windows can pick up their palette from the underlying console window. Try it: open a new instance of, say, CMD.EXE, and make some obvious change to its palette; say, make "black" blue. Then attach it to Take Command.

I don't know where the colors in the .INI file come in: whether they override the console palette, or set defaults for new consoles, or whatever. It's been years since I messed with those.
 
Guys, the part of this that I do not understand is why if I uninstall TCMD and reinstall it all should be be "default again, yes? But it ain't.

As for my hardware being off in the settings, that should not be if the only place I have this issue is in TCMD/TCC.

Admittedly, I have played around with the TCMD/TCC settings, but should not TOTAL uninstall/reinstall reset everything? It does not seem to do so. And this is the only program(s) that I seem to have this issue with as well.

And Charles, what do you mean, "attach it to Take Command"?
 
And Charles, what do you mean, "attach it to Take Command"?

The opposite of "detach". If you right-click on a tab in Take Command and select "Detach Tab", that program will pop out into a separate console window. You can then right-click in the tab bar area and select "Attach Tabs" to rejoin it to Take Command as a tab window.

Did you try the command I posted above? You will need to close and restart Take Command after running it.
 
I'm pretty sure that an uninstall/reinstall will preserve your TCMD.INI file. So everything will not be completely default. You might try this: after finding the INI file (ECHO %_ININAME), uninstall, delete the INI file, and reinstall.

In TCMD's "Tabs" menu there's an "Attach..." option. If there's only one console, it will attach it to TCMD; if there are more then one it'll let you select one to attach.

1730741817622.webp


You never said ... when TCC is running NOT IN TCMD, is it a console or in Windows Terminal? See post #3 for the difference.
 
You might also try this. C0C0C is pretty close to black.

Code:
v:\> regdir /v /d hkcu\console | findstr "ColorTable00"
  ColorTable00 : REG_DWORD : 789516
    ColorTable00 : REG_DWORD : 789516

v:\> echo %@eval[789516=h]
C0C0C
 
@echo off
cls
c:
Cd \
rem unalias dd
alias /r c:\alias.txt
rem set colordir=dirs:bright cyan;rdonly:bright yellow;system:bright green
cls
bri whi on black
rem cls


OK, I have the colors pretty much where I want them. Except no matter what I try, I can't get the background in TCMD to be black. It stays blue. TCC is bight white ion black. But not TCMD. It is blue.
 
What does this produce?

Code:
echo %@eval[%@regquery[HKCU\Console\ColorTable00]=h]
 
That registry key is where the background color comes from. Below, first blue (00FF0000), then green (0000FF00), then red (000000FF).

1730747574947.webp


1730747632630.webp


1730747692206.webp
 
That's pretty darn BLUE!

These are the traditional colors.

Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:00000000
"ColorTable01"=dword:00800000
"ColorTable02"=dword:00008000
"ColorTable03"=dword:00808000
"ColorTable04"=dword:00000080
"ColorTable05"=dword:00800080
"ColorTable06"=dword:00008080
"ColorTable07"=dword:00c0c0c0
"ColorTable08"=dword:00808080
"ColorTable09"=dword:00ff0000
"ColorTable10"=dword:0000ff00
"ColorTable11"=dword:00ffff00
"ColorTable12"=dword:000000ff
"ColorTable13"=dword:00ff00ff
"ColorTable14"=dword:0000ffff
"ColorTable15"=dword:00ffffff
"DefaultBackground"=dword:00000000
"DefaultForeground"=dword:00808080
"CursorColor"=dword:00ffffff

These are the new-fangled colors.

Windows Registry Editor Version 5.00

Code:
[HKEY_CURRENT_USER\Console]
"ColorTable00"=dword:000c0c0c
"ColorTable01"=dword:00da3700
"ColorTable02"=dword:000ea113
"ColorTable03"=dword:00dd963a
"ColorTable04"=dword:001f0fc5
"ColorTable05"=dword:00981788
"ColorTable06"=dword:00009cc1
"ColorTable07"=dword:00cccccc
"ColorTable08"=dword:00767676
"ColorTable09"=dword:00ff783b
"ColorTable10"=dword:000cc616
"ColorTable11"=dword:00d6d661
"ColorTable12"=dword:005648e7
"ColorTable13"=dword:009e00b4
"ColorTable14"=dword:00a5f1f9
"ColorTable15"=dword:00f2f2f2
"DefaultBackground"=dword:000c0c0c
"DefaultForeground"=dword:00cccccc
"CursorColor"=dword:00ffffff

Both REG files are attached if you want to use one of them.
 

Attachments

I cannot for the life of me find a way to have the backgrounds black. Yea, I know I've played with it over the years, but isn't there a way to get from my blue background to black?
I've tried various setups that come with the program, but I still end up where I started, no black background.

Help?

Hi!

I've completely foregone TCC's colors (except when it's more efficient to use them) in favor of just using ANSI coloring.


I invite you to check out my set-ansi.bat:

And also my set-emoji.bat (and emoji.env datafile):



Between the two, you get pretty much 100% of all possible VT100 functionality under TCC+Windows Terminal

In your case, you would just simply add ```%ANSI_BACKGROUND_BLUE% or %ANSI_BACKGROUND_BRIGHT_BLUE% to your echo statement.

To get the blue to extend to the very end of line, just add %ANSI_EOL% to the end of any line.
To reset, just add %ANSI_RESET%

If you've used obscure ansi codes to actually hardcode an RGB value for foreground and background colors or to change the cursor to a non-defualt shape or color, just add %ANSI_RESET_FULL%
 
I give up guys. Ain't nuttin working with this color deal. Oh well... Thanks though

1) try this:

*echos %@CHAR[27][48;2;0;0;0m

2) And if you don't like the background color getting not going across the screen all the way, simply add this to the end of your line:

set ANSI_EOL=%@CHAR[27][0K

for example:
*echos %@CHAR[27][48;2;0;0;0m%ANSI_EOL%

it's the difference between these two:

1731297084121.webp


However, that only creeps up in multiline situations, not necessary usually for single line:

1731297140958.webp

Hope this helps
 
Claire, THAT gave me the black background! GOOD JOB! Now what do I need to add so that I get bright white (or cyan) text on that background?

Added: I just tried "color bri white on black" and that gave me the bright white on black -- until I issued a cls. How do I avoid that?
 
Claire, THAT gave me the black background! GOOD JOB! Now what do I need to add so that I get bright white (or cyan) text on that background?

Added: I just tried "color bri white on black" and that gave me the bright white on black -- until I issued a cls. How do I avoid that?

Mine persists after a cls. But it didn't until i removed the ansi-reset that is built into my prompt, as i very much want everything returned to normal when I get back to my prompt.

Have you looked into ColorTool.exe ? Before I switched to Windows Terminal, I didn't have tabs or panes, so i had separate windows for each TCC. When I hit Winows 10, they removed the variable border width function. I could no longer see the edge of the window. Which meant I could no longer see where one window ended, and the other began.

The solution to my problem reminds me very much of your situation.

I used some voodoo to create 64 different color schemes that all redefine black as an ever-slightly-different shade of black. I called it "randblack.bat" and it used my set-randfile.bat to pick a random profile from the 64 ones, and then used ColorTool to set it to that random color profile.

The result was each and every TCC window had it's own unique shade of background-black, eliminating the visual confusion of where one starts and another ends.

I suspect that perhaps you can use colortool in a similar fashion, because not only does it allow you to redefine what colors are, but it sets the foreground and background color!

It is invoked like:

colortool.exe myprofile.ini

And the profile.inis look like this:

Code:
[table]
DARK_BLACK = 0,0,10
DARK_BLUE = 0,55,218
DARK_GREEN = 19,161,14
DARK_CYAN = 58,150,221
DARK_RED = 197,15,31
DARK_MAGENTA = 136,23,152 (i think  170,0,85 is a better dark magenta more easily distinguished from purples and pinks)
DARK_YELLOW = 193,156,0
DARK_WHITE = 204,204,204
BRIGHT_BLACK = 118,118,118
BRIGHT_BLUE = 59,120,255
BRIGHT_GREEN = 22,198,12
BRIGHT_CYAN = 97,214,214
BRIGHT_RED = 231,72,86
BRIGHT_MAGENTA = 180,0,158   (i think 255, 0, 170 is a better bright magenta more easily distinguished from purples and pinks)
BRIGHT_YELLOW = 249,241,165
BRIGHT_WHITE = 242,242,242

[screen]
FOREGROUND = DARK_WHITE
BACKGROUND = DARK_BLACK

[popup]
FOREGROUND = DARK_MAGENTA
BACKGROUND = BRIGHT_WHITE

Notice the "screen" section near the end? FOREGROUND=DARK_WHITE, BACKGROUND=DARK_BLACK?
I think this may be what you need to use.

Grab colortool here:

Also, personal opinion, the default magenta is theoretically correct, but on every screen i've tested it on, it does NOT look magenta.
 
Claire, THAT gave me the black background! GOOD JOB! Now what do I need to add so that I get bright white (or cyan) text on that background?

Alas, setting by ANSI is just for the moment. that's where colortool comes in.

But if you do want to find other ansi codes, dig around my set-ansi.bat, it has everything possible. I literally read he VT100 manual front to back and tried it all.


Or even better, try running it. At that point, most of the codes are environment variables and you can use them easily

Code:
ANSI_CYAN=←[36m
ANSI_BACKGROUND_BLACK=←[40m

echo %ansi_cyan%%ansi_background_black%No more need to remember the individual codes

When you use codes like "36, 40", you're using the system-defined colors [which can be redefined with colortool]

when you use the RGB examples i gave above, you are defining the RGB yourself, and colortool can't affect it.

different strokes for different situations.
 
Also I suggest creating environment variables for coloring your various message types (warning, error, debug, etc). Helps with maintenance down the line. (I have a section at the end of set-ansi.bat where I do that)
 
Back
Top