Download colors.bat and customize console colors now!

Date:

Share post:

Alright, let me tell you about this little thing I cooked up called . It’s nothing fancy, but it’s saved my bacon more than a few times when I’m messing around with batch scripts and need some color in my life.

Download colors.bat and customize console colors now!

So, it all started when I was staring at a command prompt that was just…black and white. Boring, right? I wanted to make certain outputs stand out, like errors or important messages. I knew there had to be a way to change the text color in a batch file, and after a bit of digging (and a lot of trial and error), I stumbled upon the color command.

The color command in Windows is pretty straightforward. You just type color followed by two hexadecimal digits. The first digit sets the background color, and the second sets the text color. Easy peasy… in theory. The problem was remembering which digit corresponded to which color. I mean, who can keep that straight?

That’s when I decided to write . The goal was simple: create a batch file that would display all the available colors and let me easily pick one. Here’s what I did:

  • First, I opened up a new text file and saved it as .
  • Then, I started looping through all the possible color combinations. I used nested for loops, one for the background color and one for the text color.
  • Inside the loops, I used the color command to set the colors, then printed some text to the screen so I could see what the colors looked like.
  • To make it even easier to read, I included the hex code for each color combination in the output.

Here’s a simplified snippet of the code:


@echo off

Download colors.bat and customize console colors now!

for /l %%b in (0,1,15) do (

for /l %%f in (0,1,15) do (

color %%b%%f

echo Color Code: %%b%%f - This is some sample text.

pause

Download colors.bat and customize console colors now!

Okay, so that’s a basic version. The real file also includes a legend at the top, showing what each hex digit represents (e.g., 0 = Black, 1 = Blue, 2 = Green, etc.). I also added a pause command at the end so the window wouldn’t just disappear after running.

To use it, I just open a command prompt, navigate to the directory where I saved , and run it. The screen fills up with all sorts of color combinations. When I find one I like, I just note the hex code and use it in my other batch scripts.

Now, I know it’s not the most sophisticated piece of code in the world, but has been a surprisingly useful little tool. It takes the guesswork out of using the color command, and it adds a little bit of visual flair to my batch scripts. Give it a shot; you might find it handy too!

Pro Tip: Don’t go overboard with the colors. A little bit of color can make your scripts easier to read, but too much can be distracting. Use it sparingly and for a good reason.

Final Thoughts

So yeah, that’s the story of . A simple tool born out of sheer boredom and a desire for a little more color in my command-line life. Hope you found it helpful!

Download colors.bat and customize console colors now!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related articles

How to claim your Bleacher Report class action settlement money? Easy steps to get your payout fast!

So, I came across this thing, the Bleacher Report class action settlement, not too long ago. It wasn’t...

Where can I find official Tommy Cash tour merchandise? (Discover cool t-shirts and exclusive collectibles online)

Alright, so I finally got around to putting my thoughts down about that Tommy Cash tour. It’s been...

Curious about the 1986 Reds now? See what your favorite players from the team are doing today.

Okay, let me tell you about this “1986 reds” thing I got myself into. It wasn’t some grand...

Want the New York CEO Lamborghini lifestyle? Learn how these top bosses achieved success and luxury cars.

Alright, let’s talk about this whole “New York CEO Lamborghini” thing. You see the pictures, you hear the...