property HighlightColor: TColor;
HighlightColor is the brush colour the view uses when painting the
search-result mask over every match found by
HighlightSearchText. The mask is overlaid on each
redraw, on top of the rendered PDF page, so the highlight visibly
tracks scrolling and zoom without re-running the search.
The default value is clYellow — the convention
every mainstream PDF reader uses for find-in-page highlights. The
property is published so applications can theme the colour to match
their UI palette without subclassing TPdfView (a deep amber for a
sepia reader theme; a soft cyan for a dark-mode viewer).
HighlightColor is the only styling knob for the overlay — the mask is a flat colour fill behind the text, intentionally simple so that highlight rectangles never obscure glyph anti- aliasing. For multi-coloured highlights (different colours per match / per query / per page), use a custom OnPaint handler instead of HighlightSearchText.
// Theme the highlight to match a dark reader UI
PdfView1.HighlightColor := $00FFFF66; // pale yellow
PdfView1.HighlightSearchText('invoice', False, True);
// Round-trip via the Object Inspector default
PdfView1.HighlightColor := clYellow;