Help > Web Development > Object Reference > Object Reference > ISYSDocument > SetHighlightColors Method
<a name="kanchor344"></a>ISYSDocument:SetHighlightColors Method
Sets the colors to use for hit-highlighting when returning HTML from the Line method.

Note: This method is provided for compatibility with ISYS 6. Applications should use the ISYSResultList.SearchTerms.

Syntax
[VBScript]
sub ISYSDocument.SetHighlightColors(_
  string color1, _ 
  string color2_ 
)
[C#]
void IISYSDocument.SetHighlightColors(
  string color1, 
  string color2
);
[ColdFusion/Java]
void IISYSDocument.SetHighlightColors(
  java.lang.String color1, 
  java.lang.String color2
) throws ComException;
Parameters
color1The foreground font color encoded as HTML
color2The background color encoded as HTML

Examples
[VBScript]
<% ' Execute the search object and get the results Set Results = ISYSSearch.Execute ' Get the first document Set Document = Results(1) ' Set the highlight color to blue on yellow Document.SetHighlightColors "#0000FF", "#FFFFFF" ' Display 3 line before the the last hit lastHit = Document.GetLineWithHitBefore(Document.LineCount + 1) for i = lastHit-3 downto lastHit if i > 1 then Response.Write Document.Line(i, isysStyleHTML) next %>