Make it easier with color changing How can I simplify this in Delphi?

Procedure colori1
Begin

 if Temperatura&lt;=15 then
 begin
  Form1.Label1.Font.Color:=clBlue;
  Form1.Label2.Font.Color:=clBlue;
  Form1.Label3.Font.Color:=clBlue;
  Form1.Label4.Font.Color:=clBlue;
  Form1.Label5.Font.Color:=clBlue;
 end;

 if (Temperatura&gt;=16) and (Temperatura&lt;=18) then
 begin
  Form1.Label1.Font.Color:=clAqua;
  Form1.Label2.Font.Color:=clAqua;
  Form1.Label3.Font.Color:=clAqua;
  Form1.Label4.Font.Color:=clAqua;
  Form1.Label5.Font.Color:=clAqua;
 end;

 if (Temperatura&gt;=19) and (Temperatura&lt;=22) then
 begin
  Form1.Label1.Font.Color:=clLime;
  Form1.Label2.Font.Color:=clLime;
  Form1.Label3.Font.Color:=clLime;
  Form1.Label4.Font.Color:=clLime;
  Form1.Label5.Font.Color:=clLime;
 end;

 if (Temperatura&gt;=23) and (Temperatura&lt;=26) then
 begin
  Form1.Label1.Font.Color:=clYellow;
  Form1.Label2.Font.Color:=clYellow;
  Form1.Label3.Font.Color:=clYellow;
  Form1.Label4.Font.Color:=clYellow;
  Form1.Label5.Font.Color:=clYellow;
 end;

 if (Temperatura&gt;=27) and (Temperatura&lt;=29) then
 begin
  Form1.Label1.Font.Color:=$000080FF;
  Form1.Label2.Font.Color:=$000080FF;
  Form1.Label3.Font.Color:=$000080FF;
  Form1.Label4.Font.Color:=$000080FF;
  Form1.Label5.Font.Color:=$000080FF;
 end;

 if Temperatura&gt;=30 then
 begin
  Form1.Label1.Font.Color:=clRed;
  Form1.Label2.Font.Color:=clRed;
  Form1.Label3.Font.Color:=clRed;
  Form1.Label4.Font.Color:=clRed;
  Form1.Label5.Font.Color:=clRed;
 end;
end;


If I use "for cycle" like this:

For i:=0 to n do label[i].font.color:=clRed


I'll obviously get an error, because Delphi doesn't know what label[i] means. Any suggestions?
Declare a local variable to hold the color:

var
  Color: TColor;


Then decide what the color should be:

if Temperatura&lt;=15 then
  Color:=clBlue;
else if Temperatura&lt;=18 then
  Color:=clAqua;
else ...


Then assign the color to the controls:

Form1.Label1.Font.Color:=Color;
Form1.Label2.Font.Color:=Color;
....


The labels could be stored in an array or a list. So that you can iterate over them to assign the color. You could declare the array like this, in the form class:

FLabels: TArray&lt;TLabel&gt;;


In the constructor assign it like this:

FLabels := TArray&lt;TLabel&gt;.Create(Label1, Label2, Label3, Label4, Label5);


To iterate over it setting the color do this:

var
  lbl: Tlabel;
....
for lbl in FLabels do
  lbl.Font.Color:=Color;


You appear to be using a global variable Form1. Your code will be better without that global variable, and having this procedure (and others like it) converted into a method of the form.