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

Want to know Spains most famous woman? See the top names here!

Okay so I stumbled across this question about Spain’s most famous women while scrolling through stuff this morning....

35 and single female mindset: Change your thinking to be happier

Last Thursday night I was doomscrolling through Instagram again, feeling like absolute crap watching engagement ring ads and...

Best French Streams Alternatives to Watch Free Movies Online

Alright so here’s what went down today. My usual go-to for catching flicks kinda went belly up this...

moreshoe casual shoes stylish designs for daily outfits

My Casual Shoe Styling Experiment Today Alright, so lately I’ve been kinda tired of my same old sneakers or...