i wrote this script today cause im sick of looking at 3 or 4 terminal windows and trying to work out which one is the the one i want.
so heres a script that will only change the text colour and background of the frontmost terminal window to white on black
tell application "Terminal"
tell window 1
set background color to "black"
set normal text color to "white"
set bold text color to "white"
end tell
end tell
here’s another one i wrote up with a little interaction :
set Skyblue to {-13467, -7348, -1}
set LightYellow to {-1, -1, -18762}
set white to "white"
set black to "black"
display dialog "To what color background ?
type something in the box and click any button to return to default{black on white}" default answer "" buttons {"Black", "Sky Blue", "Light Yellow"} default button 1
set theResult to the result as list
set theButton to item 2 of theResult
if item 1 of theResult is not equal to "" then
changeTermColor(black, white)
else if theButton is "Black" then
changeTermColor(white, black)
else if theButton is equal to "Sky Blue" then
changeTermColor(black, Skyblue)
else if theButton is equal to "Light Yellow" then
changeTermColor(black, LightYellow)
end if
on changeTermColor(textCol, BackCol)
tell application "Terminal"
tell window 1
set background color to BackCol
set normal text color to textCol
set bold text color to textCol
end tell
end tell
end changeTermColor