Programmer's Guide > Interfaces > Window interface > foregroundColor attribute
  
foregroundColor attribute
The foreground color of the window. For dialogs, you can both set and get the foreground and background colors of a window. For edit windows, you can only get the foreground and background colors of a window. You cannot set the foreground and background colors of an edit window.
foregroundColor
Access
read-write
Returns
String
Set throws
WindowException
INVALID_COLOR_ERR: Raised if the DOMString is an unsupported color name or an invalid RGB specification.