Custom color profiles + button switch

English support forum

Moderators: petermad, Stefan2, white, Hacker

Zoli G
Junior Member
Junior Member
Posts: 2
Joined: 2022-09-18, 16:35 UTC

Custom color profiles + button switch

Post by *Zoli G »

is it possible to have one or more custom color profiles and switch between them on the fly the same way as between the Light adn dark mode ? I would like to have at least two extra color profiles (either directly in wincmd.ini or using the RedirectSection option to the those profiles in custom ini files). I just dont know if its possible. I also use the Dark mode, I have a button for it on the button bar, would be cool to have buttons for the extra color profiles too.
User avatar
Native2904
Senior Member
Senior Member
Posts: 320
Joined: 2014-01-30, 14:23 UTC
Location: Aachen

Re: Custom color profiles + button switch

Post by *Native2904 »

You can customize Color.ini and Colordark.ini to your liking and create two different color profiles. You can also find additional color profiles online on GitHub, or alternatively, you can use a program of your choice, extract the corresponding color values, and insert them into your INI configuration.

Code: Select all

[Colors]
RedirectSection=%COMMANDER_PATH%\Inis\color.ini
RedirectSection=%COMMANDER_PATH%\Inis\colorsdark.ini
Glückauf
#270101 Single user licence.
Total Commander 64-bit – latest version – Windows 11 Pro 24H2
Fla$her
Power Member
Power Member
Posts: 3442
Joined: 2020-01-18, 04:03 UTC

Re: Custom color profiles + button switch

Post by *Fla$her »

2Zoli G
See kITUP.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 16697
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Custom color profiles + button switch

Post by *petermad »

Native2904 wrote: 2026-02-13, 22:42 UTC extract the corresponding color values, and insert them into your INI configuration.

Code: Select all

[Colors]
RedirectSection=%COMMANDER_PATH%\Inis\color.ini
RedirectSection=%COMMANDER_PATH%\Inis\colorsdark.ini
You cannot make more than one redirection in the same section.

It should rather be:

Code: Select all

[Colors]
RedirectSection=%COMMANDER_INI_PATH%\colors.ini

[ColorsDark]
RedirectSection=%COMMANDER_INI_PATH%\colors.ini
Then you can make different colors schemes in different files - for example: colors1.ini, colors2.ini, colors3.ini etc. - each containing the two sections [Colors] and [ColorsDark] - and copy one of these to colors.ini and restart TC when you want to change the scheme.

Using %COMMANDER_INI_PATH% will make sure that the files can also be written to if TC is for example installed in "C:\Program Files"
License #524 1994
Danish TC Translator
TC 11.57b1 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1405a
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Native2904
Senior Member
Senior Member
Posts: 320
Joined: 2014-01-30, 14:23 UTC
Location: Aachen

Re: Custom color profiles + button switch

Post by *Native2904 »

2 petermad
I had the same idea. However, I failed in the practical implementation because I only have one wincmd.ini.
Then I thought: okay, I could simply copy wincmd.ini multiple times and use different color configurations like this in each wincmd:

Code: Select all

[Colors]
RedirectSection=%COMMANDER_PATH%\Inis\color.ini(1)(2)(3..)
But how can I start Total Commander so that it uses a different wincmd.ini (basically the same) file??
If I knew how to do that, I could create multiple color.ini files based on my current setup (based on DraculaTheme) and switch between them easily.
Last edited by Native2904 on 2026-02-15, 23:29 UTC, edited 1 time in total.
Glückauf
#270101 Single user licence.
Total Commander 64-bit – latest version – Windows 11 Pro 24H2
User avatar
petermad
Power Member
Power Member
Posts: 16697
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Custom color profiles + button switch

Post by *petermad »

It can be automated like this:

Copy the [Colors], [ColorsDark] and [ListerDark] sections from your current wincmd.ini file to a colors0.ini file (in the same location as the wincmd.ini file).
Copy the [Colors], [ColorsDark] and [ListerDark] sections of your first alternative color scheme to a colors1.ini file.
Copy the [Colors], [ColorsDark] and [ListerDark] sections of your second alternative color scheme to a colors2.ini file.
etc. etc...

In wincmd.ini change the [Colors], [ColorsDark] and [ListerDark] sections to:

Code: Select all

[Colors]
RedirectSection=colors.ini

[ColorsDark]
RedirectSection=colors.ini

[ListerDark]
RedirectSection=colors.ini
Make this entry in you usercmd.ini file (in the same location as the current wincmd.ini file)

Code: Select all

[em_copy_colorini]
cmd=%COMSPEC% /C
param=COPY /Y %|COMMANDER_INI_PATH|\colors%A.ini %|COMMANDER_INI_PATH|\colors.ini
iconic=1
Make buttons like these:

Code: Select all

TOTALCMD#BAR#DATA
em_copy_colorini 0,cm_Exit 5

wcmicons.dll,34
Use color profile 0


-1

Code: Select all

TOTALCMD#BAR#DATA
em_copy_colorini 1,cm_Exit 5

wcmicons.dll,34
Use color profile 1


-1

Code: Select all

TOTALCMD#BAR#DATA
em_copy_colorini 2,cm_Exit 5

wcmicons.dll,34
Use color profile 2


-1
etc. etc...
To make the buttons:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
Now you can switch between color scheme 0, 1 and 2 with those buttons.

Notice that if you make changes to the current colors from TC's user interface, then the changes will be written to colors.ini, and you will have to copy colors.ini to the appropriate colorsN.ini file to save the changes for the future.

Notice that cm_Exit 5 will save the current paths, folder tabs, columns, sorting. If you don't want that (if you for example have disabled "Configuration" -> "Operation" -> "Save on exit" -> "Directories" and "Panels (brief/full etc.)") - then you can use cm_Exit 9 instead.
License #524 1994
Danish TC Translator
TC 11.57b1 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1405a
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Native2904
Senior Member
Senior Member
Posts: 320
Joined: 2014-01-30, 14:23 UTC
Location: Aachen

Re: Custom color profiles + button switch

Post by *Native2904 »

Wow. I will try it.. Thank you!
Glückauf
#270101 Single user licence.
Total Commander 64-bit – latest version – Windows 11 Pro 24H2
Fla$her
Power Member
Power Member
Posts: 3442
Joined: 2020-01-18, 04:03 UTC

Re: Custom color profiles + button switch

Post by *Fla$her »

petermad wrote: 2026-02-14, 15:16 UTC Notice that cm_Exit 5 will save the current paths, folder tabs, columns, sorting. If you don't want that ... - then you can use cm_Exit 9 instead.
I doubt that he even wants to restart TC, which can be avoided by additional means.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 16697
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Custom color profiles + button switch

Post by *petermad »

I doubt that he even wants to restart TC, which can be avoided by additional means.
Well

Code: Select all

TOTALCMD#BAR#DATA
em_copy_colorini 0,cm_Exit 5

wcmicons.dll,34
Use color profile 0


-1
could be changed to:

Code: Select all

TOTALCMD#BAR#DATA
em_copy_colorini 0,cm_SwitchDarkMode,cm_SwitchDarkMode

wcmicons.dll,34
Use color profile 0


-1
etc., etc....

That will also force TC to reread the Color sections
License #524 1994
Danish TC Translator
TC 11.57b1 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1405a
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
AkulaBig
Power Member
Power Member
Posts: 652
Joined: 2021-09-09, 17:28 UTC

Re: Custom color profiles + button switch

Post by *AkulaBig »

Zoli G wrote: 2026-02-13, 18:49 UTC is it possible to have one or more custom color profiles and switch between them on the fly the same way as between the Light adn dark mode ?
Yes, such a solution is present in my build
https://www.dropbox.com/scl/fi/pfkypk3ys6k8yzuhv1jac/TotalCommanderPortable.exe?rlkey=qfsfjs9jf2ubdhdpf9gggada0&dl=1 Switch to the Settings panel and switch between color themes.
User avatar
petermad
Power Member
Power Member
Posts: 16697
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Custom color profiles + button switch

Post by *petermad »

AkulaBig wrote: 2026-02-14, 18:00 UTC Yes, such a solution is present in my build
https://www.dropbox.com/scl/fi/pfkypk3ys6k8yzuhv1jac/TotalCommanderPortable.exe?rlkey=qfsfjs9jf2ubdhdpf9gggada0&dl=1 Switch to the Settings panel and switch between color themes.
Is it possible to see this solution, without having to install 170Mb ? Also, I got warnings about two viruses in TotalCommanderPortable.exe !
License #524 1994
Danish TC Translator
TC 11.57b1 32+64bit on Windows XP 32bit & Windows 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1405a
TC 3.62 on Android 6, 13, 15 & 16
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
AkulaBig
Power Member
Power Member
Posts: 652
Joined: 2021-09-09, 17:28 UTC

Re: Custom color profiles + button switch

Post by *AkulaBig »

petermad wrote: 2026-02-15, 01:31 UTC Is it possible to see this solution, without having to install 170Mb ?
It won't work. How will you see the color scheme change without running TC? And there are many components involved. Words cannot explain it. This size is because this is my work build.
petermad wrote: 2026-02-15, 01:31 UTCAlso, I got warnings about two viruses in TotalCommanderPortable.exe !
There are programs written in AutoIt. Hysterical antivirus specialists can identify them as viruses.
Fla$her
Power Member
Power Member
Posts: 3442
Joined: 2020-01-18, 04:03 UTC

Re: Custom color profiles + button switch

Post by *Fla$her »

AkulaBig wrote: 2026-02-15, 03:07 UTCWords cannot explain it.
Of course, I didn't use the installer for your build, but after analyzing the unpacked SwitchColor.aucfg, I didn't see nothing difficult to explain there. There you have a sequential switching between Ini\ColorsN.ini by counter, and for confirmation, cm_SwitchColorsByFileType is executed twice (only for some reason through CommandExec, but not SendCommand, as explained in the help). I also didn't understand why, instead of changing the value of the ini key, you edit the file names via cmd.
As it is, to publish the code, it's enough to remove the part that changes the icon. The code itself is fairly simple. Attaching ColorsN.ini isn't a problem either.

Unlike pressing a button with a specific (desired) color scheme, such a switch is hardly practical. It might be fun for a demonstration, but nothing more.
Also, this is too little for me, since the color scheme should apply to all wlx plug-ins where it's supported.
Overquoting is evil! 👎
User avatar
Native2904
Senior Member
Senior Member
Posts: 320
Joined: 2014-01-30, 14:23 UTC
Location: Aachen

Re: Custom color profiles + button switch

Post by *Native2904 »

2petermad
Hi, i just want you to say that your solution work great... beside that TC is a powerful maschine to manage files the possibility to change the Theme is nice.
I want you ask if is it possible too to give a hint in the title bar what profile is loading?
e.g.:
Total Commander (x64) 11.56 - Björn Dxxxxxx@Grovebox\Dracula\BigSur
Glückauf
#270101 Single user licence.
Total Commander 64-bit – latest version – Windows 11 Pro 24H2
User avatar
nsp
Power Member
Power Member
Posts: 2019
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Custom color profiles + button switch

Post by *nsp »

To change titlebar, you can use the property TitleExtraText in [configuration] section of %commander_ini% file.
You can use a small tool like iniset (minini ), or initool to set TitleExtraText. Do not forgot to use the position marker *,-,$ before your text. If you use redirect section with distinct file as source, i suggest you to write a small batch to do all for you at once except reloading of ini.
Post Reply