There are already some options for that, but you can add additional conditions.
From the Microsoft Help:
Add color to items in a view
You can add color to items in any table (table: A view type that displays a
list of items (rows) and their attributes (columns). Use this view to display
details about items. Table is the default view type for Inbox and Tasks.)
view by applying the color and text formatting you want to use.
On the View menu, point to Arrange By, point to Current View, and then click
a view based on the table view type (view type: The basic structure of a
view. When you create a view, you must first select one of five view types
(table, timeline, day/week/month, card, or icon) to determine how information
will be arranged and formatted in your new view.).
On the View menu, point to Arrange By, point to Current View, and then click
Customize Current View.
Click Automatic Formatting.
Click Add.
In the Name box, type a name for the rule.
Click Condition, and then select the options you want.
Click OK.
Click Font, and then select the options you want.