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

Decoding dirtbike tire size meaning is key! What do all those letters and numbers really stand for?

Alright, let me tell you, when I first got serious about dirt bikes, looking at tire sizes was...

Easy Peasy 124 lbs to kg Conversion: We Show You How It Is Done for Everyone.

Alright, so today, I found myself needing to switch 124 pounds over to kilograms. It’s one of those...

Remember the awesome 1993 new york yankees roster? Relive the glory with every player name listed!

So, the other day, I got to thinking about baseball from a while back, specifically the early 90s....

Bronny James Jail news: Did LeBrons son really get into trouble? Find out the actual truth here.

My Encounter with the “Bronny James Jail” Story Alright, so the other day, this “Bronny James jail” thing popped...