Change Finder Colours From Command Line

Took a little looking but …

xattr -w -x com.apple.FinderInfo "0000000000000000000E00000000000000000000000000000000000000000000" /filetochange

The 0E in that string is the Colour

0C = Red

0E = Orange

0A = Yellow

04 = Green

08 = Blue

06 = Purple

02 = Gray

Note for 10.6 and higher

If you need to do this on an OS before 10.6 then use this setlabel app. It’s PPC but works fine on Intel Macs too, Just have rosetta installed

setlabel