Conditional Color Coding on SharePoint 2013 Task List using JSLink
Requirements Conditionally display KPI style indicators on OOTB Task list web parts:
red for overdue tasks
yellow for tasks due in next 7 days,
green for upcoming tasks beyond 7 days in the future
blank when no due date is set