Color Terminal.app windows in Leopard

We have been running a shell script alias that uses ssh and colors the resulting Terminal windows based on the host name.

Color is set as, for example
color=‘{-1, -1, -6000}’ # pale beige
color=‘{-1, -11620, -21993}’ # a salmony orange

the script runs as follows


  tell application "Terminal"
   set the background color of the front window to $color
  end tell

Today we upgraded to Leopard and the “new” Terminal. Now I get an error:

Terminal got an error: Can’t make {-1, -1, -6000} into type color. (-1700)

Any ideas?

Model: MacBook G4
Browser: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.0.7) Gecko/20060911 Camino/1.0.3
Operating System: Mac OS X (10.5)

Hi and welcome,

I guess, AppleScript doesn’t accept negative numbers for colors
Here’s a simple solution to calculate the positive equivalents

set thecolor to {-1, -11620, -21993}
repeat with i in thecolor
	if i < 0 then set contents of i to 65536 + i
end repeat
tell application "Terminal"
	set the background color of the front window to thecolor
end tell

That seems to work.
Has anyone else had smething similar change with Leopard? Shall I file a bug report?
This script was wrking under several previous releases of Mac OS X.