Color in BATCH

Hello,

Is it possible to change the color of a word in BATCH?

I know how to change the background and all the text.

Can you help me please?
Thank you

Configuration: Windows XP / Firefox 3.6.3

5 answers

  1. Use color xx
    Where x is a hexadecimal number
    Citation: Command prompt
    0 = Black 8 = Gray 1 = Dark Blue 9 = Light Blue 2 = Green A = Light Green 3 = Blue-Gray B = Cyan 4 = Brown C = Red 5 = Purple D = Pink 6 = Olive E = Yellow 7 = Light Gray F = White
    1. Re,
      better, we type:

      COLOR /? which results in:

      Changes the default colors of the console's foreground and background.

      COLOR [attr]

      attr Specifies the color attributes for the console appearance

      Color attributes are specified by TWO hexadecimal digits -- the
      first corresponds to the background, the second to the foreground. Each digit
      can take any of these values:

      0 = Black 8 = Gray
      1 = Dark Blue 9 = Light Blue
      2 = Green A = Light Green
      3 = Blue-Gray B = Cyan
      4 = Brown C = Red
      5 = Purple D = Pink
      6 = Olive E = Yellow
      7 = Light Gray F = White

      If no argument is given, this command restores the colors
      selected when CMD.EXE was opened. This value comes either from the
      console window, the command line switch /T, or the
      DefaultColor value from the registry.

      The COLOR command sets ERRORLEVEL to 1 if you attempt to execute it
      with the same color for both background and foreground.

      Example: "COLOR fc" displays red on white
  2. I'm sorry for you for not knowing how to use Google, you can find absolutely everything even the unimaginable.


    I already did several searches before posting.

    I asked on CCM because I have already seen colors in batch.
    1. Learn to read before responding. He wanted a selection of text, not the entire patch.
    2. Contributor
      I hope that in 5 years he has managed to learn how to read.
      Which is certainly not the case for you either?
  3. Hello

    it's impossible to color the text only under the MS-DOS system, but it's possible under Linux or Windows (GUI, API)

    karirovax ;)
    1. Bonjour, comment fait-on pour écrire en couleur et maîtriser le graphisme en 2D ?
  4. It's a shame that people don't take the time to search before posting.
    I searched on Google and one second later I had the answer.
    http://www.infos-du-net.com/forum/268614-21-texte-couleur-batch

    I'm sorry for you for not knowing how to use Google; you can find absolutely everything, even the unimaginable.
    1. Good evening.

      1. It's a shame that people aren't very polite anymore either...
      2. If you don't want to answer, then don't. We're on a help forum... If Google had all the answers, we wouldn't have so many questions per day...

      Have a good evening.
    2. Thank you ric025 ;)
    3. Hello

      If Google told everything, we wouldn't have so many questions a day.... <= if people searched a little more (some aren't even capable of typing 2 words into Google and clicking on the first suggested link), we might have a few less questions.

      I don't mean to say that Antoine didn't search, my remark is more general.
    4. Hi.

      And why do you want fewer questions....???
      If it's bothering you to search for others, don't do it. It doesn't bother me...

      ++
    5. The thing is to avoid promoting the dullness of people, the lazy dependents who can't do anything on their own, I say no.

      "Give a man a fish, and he will eat for a day; teach him to fish, and he will eat for a lifetime."