Assuming Target Date is B2, Date Completed is C2

Green: =C2<>""
Yellow: =AND(B2>TODAY(),B2<=TODAY()+2)
Red: =B2<=TODAY()