help using color

looking at some of the commands in one of the applications I have on my macbook, I ran into the command color

color‚n [inh. item] : A color.

any one can give me an idea or a simple example on how this command can be used.


Hi Bill,

from the dictionary of Scripting Additions:


color (type)

Where Used
The color type is used in the following ways:
result of choose color command
default color parameter of the choose color command/event

A quick example:

tell application "TextEdit"
	make new document
	set text of document 1 to "Hallo World"
	set theColor to choose color
	set color of text of document 1 to theColor
end tell

ah…I see what’s it’s doing now. it’s allowing you to use a feature or a property in an application. makes more sense for text editors.

thanks as always Stefan :slight_smile: