Different Colors in Batch File

introduction
The color command in batch files changes the color of the terminal. This is very limited however as it does it for the entire screen, instead of one line. I have made a function that allows you to change the color of each individual line. Credit to Prof. Pickle for the idea.
Supplies
A Windows Computer (preferably 7+)
A text editor (any will work)
Basic knowledge of computers (how to navigate folders, etc.)
How to Use
Copy this code and paste it to EXACTLY this file name: fecho.bat
Now go to your root drive (usually C:\) and Windows, then System32. Copy that fecho.bat file into that folder and if it asks you if it needs admin permissions accept it. Open the cmd and type in:
This will give you the info on how to use it. For example:
returns this:
If you want to call it from a batch file you can use this:
To keep it portable (or if you don't want to do that yourself), you can use this installer here.
How It Works
part 1: the function
To understand how the function works, we need to step out of the picture and learn how the terminal really runs commands. Basically in the System32, whenever you type a command, it finds the .bat, .exe, or .com file corresponding to it and runs it. This is how we make this custom command. Now let's break down the source code:
Standard batch file logic. This blocks extra useless info from clogging up the screen.
The %1 is the first argument. Adding ~ removes any excess quotes around it. The "==" is the equals operator. It checks whether %~1 is "/?" (help argument) or empty space. If it is either one of those, it goes to the label "showhelp", which displays help information about the function and exits. The same goes for %~2.
This sets the first argument without excess quotes (%~1) to the variable text. It then sets the second argument without excess quotes (%~2) to the variable color.
This runs a powershell command. "powershell" means "run the powershell program" and "-Command" means that there will be a command argument. Write-Host means "print this to the console" and %text% is the text variable. The forward slashes (\) are escape characters, meaning that the quotes inside the quotes are a literal part of the string, not terminating it. -ForegroundColor is an argument that takes the color variable as the text color. Finally, goto :eof means "go to the end of the file", stopping the command.