According to Jarkko Laine:
The command also puts a newline character after the color value. This can be avoided by recording a macro where you:
- Invoke the command.
- Click right-arrow.
- Click backspace.
You should be able to get rid of it by changing the line to the following (untested):
<string>echo -e "color = `osascript -e 'tell application "Finder" to activate' -e 'tell application "Finder" to choose color'`; puts color.inject('#') {|tot,cur| tot += ('%04X' % cur)[0..1]}.chomp" | ruby</string> (notice the added .chomp).