You can replace your Tasks_0.php body method with following code.
Here row coloring is hard coded as a quick solution for your need. You can change colors to your preference.
I will add some module and user level settings and include it in the release code for the system.
private static $row_color_map = [
0 => 'palevioletred', //Open
1 => 'yellow', //In Progress
2 => 'pink', //On Hold
3 => 'lightgreen', //Closed
4 => 'lightgreen', //Canceled
];
public function body()
{
$this->help('Tasks Help', 'main');
$this->rb = $this->init_module(Utils_RecordBrowser::module_name(), 'task', 'task');
$me = CRM_ContactsCommon::get_my_record();
CRM_CommonCommon::status_filter($this->rb);
$this->rb->set_filters_defaults(array('employees' => $this->rb->crm_perspective_default(), 'status' => '__NO_CLOSED__'));
$this->rb->set_custom_filter('longterm', array('type' => 'select', 'label' => __('Display tasks marked as'), 'args' => array('__NULL__' => __('Both'), 1 => __('Short-term'), 2 => __('Long-term')), 'trans' => array('__NULL__' => array(), 1 => array('!longterm' => 1), 2 => array('longterm' => 1))));
$this->rb->set_defaults(array('employees' => array($me['id']), 'status' => 0, 'permission' => 0, 'priority' => CRM_CommonCommon::get_default_priority()));
$this->rb->set_default_order(array('deadline' => 'ASC', 'longterm' => 'ASC', 'priority' => 'DESC', 'title' => 'ASC'));
$this->rb->set_additional_actions_method(array($this, 'get_row_actions'));
$this->display_module($this->rb);
}
public function get_row_actions($row, $gb_row, $rb_obj) {
if ($color = self::$row_color_map[$row['status']]?: '')
$gb_row->set_attrs("style=\"background-color:$color;\"");
}