I ended up with the below script. I didn't really like the criteria i used to separate users form groups, but i didn't find any other simple option.
UPDATE
Updated the script and corrected errors. You can read further in my blog
//BELOW CODE SETS ROW COLOR IF USER IS SELECTED IN A int_x002e_lrn_x002e_members DIRECTLY OR THROUGH SPGROUP//
SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
OnPostRender: function(ctx) {
var SPfield = "int_x002e_lrn_x002e_members" //YOU CAN SET PEOPLE AND GROUPS FIELD HARE
var RowColor = "#ada" //YOU CAN SET ROW COLOR HERE
var requestUri = _spPageContextInfo.webAbsoluteUrl + '/_api/web/CurrentUser/Groups?$select=Id,Title';
var requestHeaders = { "accept" : "application/json;odata=verbose" };
var rows = ctx.ListData.Row;
var usergroupsids=[];
var result=null;
result = $.ajax({url : requestUri,contentType : "application/json;odata=verbose",headers : requestHeaders,global: false,async:false,success : function(data) {return data;}})
for (var i = 0; i < result.responseJSON.d.results.length; i++){usergroupsids.push(result.responseJSON.d.results[i].Id);}
//alert(usergroupsids); //FOR TESTING
for (var i=0;i<rows.length;i++)
{
for (var e=0;e<rows[i][SPfield].length;e++)
{
var isGroup = rows[i][SPfield][e].department == "";
if (isGroup)
{
if (($.inArray(rows[i][SPfield][e].id, usergroupsids)) != -1)
{
var rowElementId = GenerateIIDForListItem(ctx, rows[i]);
var tr = document.getElementById(rowElementId);
tr.style.backgroundColor = RowColor;
//alert('Current User is in a group' + rows[i][SPfield][e].title) //FOR TESTING
}
//alert('Element ' + e + ' ' + rows[i][SPfield][e].title + ' is a Group') //FOR TESTING
}
else
{
if (_spPageContextInfo.userId == rows[i][SPfield][e].id)
{
var rowElementId = GenerateIIDForListItem(ctx, rows[i]);
var tr = document.getElementById(rowElementId);
tr.style.backgroundColor = RowColor; //YOU CAN SET ROW COLOR HERE
//alert('Element ' + e + ' ' + rows[i][SPfield][e].title + ' is a User') //FOR TESTING
}
}
}
}
}
});