procedure TForm1.TreeView1CustomDrawItem(Sender: TCustomTreeView;
Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
if Node.Text ='Red' then
begin
Sender.Canvas.Brush.Color := clREd;
end;
if Node.Text ='Blue' then
begin
Sender.Canvas.Brush.Color := clBlue;
end;
if Node.Text ='Green' then
begin
Sender.Canvas.Brush.Color := clGreen;
end;
end;