Depends on the laws where you live, some give peds complete legal right to cross anywhere on the road and if you hit them you're at fault; others have laws that forbid peds to cross the road anywhere except in crosswalks, so if you hit the ped outside the crosswalk you're good according to the law; some places say the ped aren't even safe in a crosswalk if the light is against them. In other words you have to know the laws where you live to see how things stand.
One of my worse accidents happened because a ped was standing on a sidewalk waiting for the walk sign to change to walk, she decided she wasn't going to wait anymore and stepped off the curb right into my intended path, I did a hard turn which collapsed my front wheel and sent me sprawling onto the pavement dislocating my shoulder, I somehow missed the lady but of course the lady was no where to be found. In that area the law was if there is a walk sign a ped is to wait for the sign to say walk before they can cross, so in that circumstance it was the lady's fault. But in that same state the law says if there is a crosswalk and no walk sign then you must yield to the ped; of if the ped is crossing the street where there is no crosswalk or light then the ped must yield to others.