I finally got this working with the help form here. Thanks a bunch Rich2005!
In case anyone is interested in the solution here it is.
In case anyone is interested in the solution here it is.
Code:
echo off
SETLOCAL EnableDelayedExpansion
set "slash=\"
for %%a in (*.png) do ( Rem This reads the directory for .png files that need recolor 1 at a time
for /f "tokens=*" %%x in (118_hex_colors.txt) do ( Rem this reads in my file of hex colors 1 at a time
if EXIST "%%~pa%%~na\" ( Rem checks if the folder that the recoloed files need to go into has been created
echo yes
) else (
mkdir "%%~pa%%~na\" Rem if not it creates it
)
magick %%a -colorspace gray -fill "#%%x" -tint 100 %%~pa%%~na%slash%%%x.png
Rem the line above does the actual recolors using image magic.
)
)