ThiagoBM2021,
Here ya go. I couldn't get your RBG colors to work, but this should give you a good start.
John
Sub HighlightSummaries()
SelectAll
EditClearFormats
For i = 1 To 7
FilterEdit Name:="OLX", taskfilter:=True, Create:=True, OverwriteExisting:=True, \_
FieldName:="summary", test:="equals", Value:="yes", ShowInMenu:=False
FilterEdit Name:="OLX", taskfilter:=True, Operation:="and", \_
NewFieldName:="outline level", test:="equals", Value:=CStr(i)
FilterApply Name:="OLX"
SelectAll
If ActiveSelection > 0 Then
If i = 1 Then Font32Ex Color:=16777215, CellColor:=11892014
If i = 2 Then Font32Ex CellColor:=8630772 'salmon
If i = 3 Then Font32Ex CellColor:=15652797 'light blue
If i = 4 Then Font32Ex Color:=16777215, CellColor:=9851951 'dark blue
If i = 5 Then Font32Ex CellColor:=49407 'light grey
If i = 6 Then Font32Ex CellColor:=12566463 'purple
If i = 7 Then Font32Ex Color:=16777215, CellColor:=10498160
Else
Exit For
End If
Next i
FilterApply Name:="all tasks"
End Sub