Copy this into a batch script and run it. Do it in a Windows 10 command prompt first, then on your DOS pc to see if it still works on that.
Code:
@echo off
for /F %%a in ('echo prompt $E ^| cmd') do set "ESC=%%a"
echo %ESC%[41mRed Background%ESC%[0m
echo %ESC%[42mGreen Background%ESC%[0m
echo %ESC%[43mYellow Background%ESC%[0m
echo %ESC%[44mBlue Background%ESC%[0m
echo %ESC%[45mMagenta Background%ESC%[0m
echo %ESC%[46mCyan Background%ESC%[0m
echo %ESC%[31mRed Forground%ESC%[0m
echo %ESC%[32mGreen Forground%ESC%[0m
echo %ESC%[33mYellow Forground%ESC%[0m
echo %ESC%[34mBlue Forground%ESC%[0m
echo %ESC%[35mMagenta Forground%ESC%[0m
echo %ESC%[36mCyan Forground%ESC%[0m
echo %ESC%[2;47;30mBlack on White%ESC%[0m
echo %ESC%[1;40;37mWhite on Black Bright%ESC%[0m
echo %ESC%[2;40;37mWhite on Black Normal%ESC%[0m
echo %ESC%[4;40;37mWhite on Black Underline%ESC%[0m
echo.
echo %ESC%[7mJust reverse the default colours%ESC%[0m
Google "ANSI escape codes in dos" for the various code numbers for different colours. I believe this may require DEVICE = C:\DOS\ANSI.SYS in your config.sys file on the DOS pc. I think a Windows 10 command prompt will already have this loaded.
The first line is the magic bit, it is a nifty way to create the "escape" character as a variable which can be used in a Dos script. Don't ask me how that bit works.
@Retro6