1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? Strange colours

Discussion in 'Support' started by Roedy, Jan 7, 2013.

  1. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    I had to reinstall Windows and TCC recently. Now colours are behaving strangely.

    See the attached file. I configured black on pale yellow, which it does where where there is text, but leaves the rest of the screen a dark yellow green. Where did it get that colour from? colours.png
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,372
    Likes Received:
    40
    It looks like the "bright" bit gets lost; I don't know how. But to change the background color, I suggest CLS /C:

    Code:
    cls /c black on bright yellow
    
     
  3. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    The problem with that is you are limited to the old DOS colours, almost none of which are suitable for reading text. I can figure out how this is supposed to work, perhaps I can track down why it is not working.

    My gut feeling is it may have something to do with which palette entry is selected when you pick a new colour numerically.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,090
    Likes Received:
    85
    Is this in a stand-alone TCC console window, or in a Take Command tab window?

    How did you configure your colors? There are multiple ways to do it :
    1. The registry
    2. The console properties
    3. The Take Command configuration dialog (Tabs / Windows)
    4. The TCC configuration dialog (OPTION / Windows)
    5. ANSI strings
    Each approach has advantages and disadvantages; without knowing how you're setting your colors I can't provide an answer on how to correct it.
     
  5. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,372
    Likes Received:
    40
    But, looking at your screenshot, the text background is bright yellow. Therefore the palette entry for "bright yellow" is set correctly. I suspect you're somehow filling the console buffer with the wrong value, which gets overwritten with the right value as text is written to the console.

    Did you try CLS /C BLACK ON BRIGHT YELLOW ?
     
  6. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    I started in TCC OPTION. I set the 3 foreground and 3 background colours.

    I then pause a running BTM file and click properties.
    I then select the background colour with the number wheel.

    I am using TCC only. There are no colour commands in my BTM files.

    I have also tried Take Command config without joy.

    I presume the palettes can be ignored. It might be that you have to get all the colours of interest into the palette, then select from it. Changing the palette will destroy earlier choices.
     
  7. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    This works, but gives you very limited colour selection. Is it possible for an enhanced CLS that uses two (or six) html #rrggbb colour numbers? or is there some legacy DOS restriction? With that I could ignore the settings in the BTM properties and the palettes.

    I don't want bright yellow. I was trying to get a pale yellow. However, thing I was mainly complaining about was the alternate dim yellow background.
     
  8. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    I have discovered three facts that may be germane.

    1. There are TWO menu items on a running BTM file, one labelled DEFAULTS and one labelled PROPERTIES.

    2. When I use a colour number, I can get any 32-bit colour background I desire for the rest of the run. The problem is sticking for the next run. I still don't know if this is part of TCC or part of Windows.

    3. I could not see any sign of a list of BTM files in the registry along with information about their colours.
     
  9. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,129
    Likes Received:
    33
    It's part of Windows. A console's palette contains only 16 colors. You can change what those 16 colors are ... temporarily, as you point out above, or permanently by setting defaults. The entries in HKEY_CURRENT_USER\Console are the defaults. The entries in sub-keys are those specific to various console apps. I don't know if the app-specific ones can be changed (and remembered) from a dialog.
     
  10. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    I think the trick to making this work is to define your global palette in OPTION, then select colours only from than by clicking on the palette, You are limited to that palette of 16 colours for everything.
    The number selection seems to apply only for that one run. Everything I have read about colours and CMD.EXE assumes a limit of 16 colours.
    Logically if Properties can insert any colours for the rest of the run, something should be able to intercept that choice and make the choice persist. I think it persists the slot number in the palette, but not the colour itself.
     

Share This Page